CrossTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_CROSSTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_CROSSTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/InvalidType.h>
44 #include <blaze/util/mpl/If.h>
45 #include <blaze/util/mpl/Or.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
114 template< typename T1 // Type of the left-hand side operand
115  , typename T2 > // Type of the right-hand side operand
117 {
118  private:
119  //**********************************************************************************************
121  using Type1 = Decay_<T1>;
122  using Type2 = Decay_<T2>;
124  //**********************************************************************************************
125 
126  //**struct Failure******************************************************************************
128  struct Failure { using Type = INVALID_TYPE; };
130  //**********************************************************************************************
131 
132  public:
133  //**********************************************************************************************
135  using Type = typename If_< Or< IsConst<T1>, IsVolatile<T1>, IsReference<T1>
138  , Failure >::Type;
140  //**********************************************************************************************
141 };
142 //*************************************************************************************************
143 
144 
145 //*************************************************************************************************
158 template< typename T1, typename T2 >
160 //*************************************************************************************************
161 
162 } // namespace blaze
163 
164 #endif
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
typename Decay< T >::Type Decay_
Auxiliary alias declaration for the Decay type trait.The Decay_ alias declaration provides a convenie...
Definition: Decay.h:98
Header file for the IsVolatile type trait.
Base template for the CrossTrait class.
Definition: CrossTrait.h:116
Header file for the Decay type trait.
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.
typename CrossTrait< T1, T2 >::Type CrossTrait_
Auxiliary alias declaration for the CrossTrait class template.The CrossTrait_ alias declaration provi...
Definition: CrossTrait.h:159
Header file for the IsConst type trait.
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 IsReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:75
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75