All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CrossExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
36 #include <blaze/util/InvalidType.h>
37 #include <blaze/util/mpl/If.h>
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
64 template< typename T1 // Type of the left-hand side cross product operand
65  , typename T2 > // Type of the right-hand side cross product operand
67 {
68  private:
69  //**struct Failure******************************************************************************
71  struct Failure { typedef INVALID_TYPE Type; };
73  //**********************************************************************************************
74 
75  //**********************************************************************************************
80  //**********************************************************************************************
81 
82  //**********************************************************************************************
84  typedef typename If< IsVector<T1>
85  , typename If< IsVector<T2>
88  , typename If< IsDenseVector<T1>
89  , typename If< IsDenseVector<T2>
92  >::Type
93  , typename If< IsDenseVector<T2>
96  >::Type
97  >::Type
98  , Failure
99  >::Type
100  , Failure
101  >::Type
102  , Failure
103  >::Type
104  , Failure
105  >::Type Tmp;
106 
107  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
108  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
110  //**********************************************************************************************
111 
112  public:
113  //**********************************************************************************************
115  typedef typename SelectType< qualified, CrossExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
117  //**********************************************************************************************
118 };
119 //*************************************************************************************************
120 
121 } // namespace blaze
122 
123 #endif