![]() |
Blaze
3.6
|
Base template for the CrossTrait class. More...
#include <CrossTrait.h>
Base template for the CrossTrait class.
The CrossTrait class template offers the possibility to select the resulting data type of a generic cross product operation between the two given types T1 and T2. CrossTrait defines the nested type Type, which represents the resulting data type of the cross product. In case T1 and T2 cannot be combined in a cross product, the resulting data type Type is set to INVALID_TYPE. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, CrossTrait supports all vector types of the Blaze library (including views and adaptors). For all other data types it is possible to specialize the CrossTrait template. The following example shows the according specialization for the cross product between two static column vectors:
The following example demonstrates the use of the CrossTrait template, where depending on the two given data types the resulting data type is selected: