CrossExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
46 #include <blaze/util/InvalidType.h>
47 #include <blaze/util/mpl/And.h>
48 #include <blaze/util/mpl/If.h>
49 #include <blaze/util/mpl/Or.h>
51 
52 
53 namespace blaze {
54 
55 //=================================================================================================
56 //
57 // CLASS DEFINITION
58 //
59 //=================================================================================================
60 
61 //*************************************************************************************************
71 template< typename T1 // Type of the left-hand side cross product operand
72  , typename T2 > // Type of the right-hand side cross product operand
74 {
75  private:
76  //**struct Failure******************************************************************************
78  struct Failure { using Type = INVALID_TYPE; };
80  //**********************************************************************************************
81 
82  //**struct Result*******************************************************************************
84  struct Result { using Type = decltype( std::declval<T1>() % std::declval<T2>() ); };
86  //**********************************************************************************************
87 
88  public:
89  //**********************************************************************************************
95  , Result
96  , Failure >::Type;
98  //**********************************************************************************************
99 };
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
116 template< typename T1 // Type of the left-hand side cross product operand
117  , typename T2 > // Type of the right-hand side cross product operand
119 //*************************************************************************************************
120 
121 } // namespace blaze
122 
123 #endif
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:107
Header file for the IsRowVector type trait.
Header file for the And class template.
Evaluation of the return type of a cross product expression.Via this type trait it is possible to eva...
Definition: CrossExprTrait.h:73
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:107
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
Header file for the RemoveReference type trait.
typename CrossExprTrait< T1, T2 >::Type CrossExprTrait_
Auxiliary alias declaration for the CrossExprTrait class template.The CrossExprTrait_ alias declarati...
Definition: CrossExprTrait.h:118
Compile time logical and evaluation.The And alias declaration performs at compile time a logical and ...
Definition: And.h:76
Header file for the IsColumnVector type trait.