IsCommutative.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOMMUTATIVE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISCOMMUTATIVE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/util/EnableIf.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
81 template< typename T1, typename T2, typename = void >
83  : public BoolConstant< IsNumeric_v<T1> || IsNumeric_v<T2> >
84 {};
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
93 template< typename T1, typename T2 >
94 struct IsCommutative< T1, T2
95  , EnableIf_t< ( IsVector_v<T1> && IsVector_v<T2> ) ||
96  ( IsMatrix_v<T1> && IsMatrix_v<T2> ) > >
98 {};
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
116 template< typename T1, typename T2 >
118 //*************************************************************************************************
119 
120 } // namespace blaze
121 
122 #endif
constexpr bool IsCommutative_v
Auxiliary variable template for the IsCommutative type trait.The IsCommutative_v variable template pr...
Definition: IsCommutative.h:117
Compile time check for the commutativity of data types.This type trait tests whether or not the two g...
Definition: IsCommutative.h:82
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the UnderlyingElement type trait.
Header file for the IsMatrix type trait.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.The IsVector_v variable template provides a c...
Definition: IsVector.h:140
typename UnderlyingElement< T >::Type UnderlyingElement_t
Auxiliary alias declaration for the UnderlyingElement type trait.The UnderlyingElement_t alias declar...
Definition: UnderlyingElement.h:132
Header file for the IsVector type trait.
Header file for the EnableIf class template.
Header file for the IsNumeric type trait.
Header file for the IntegralConstant class template.