IsColumnMajorMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 #include <blaze/util/FalseType.h>
46 #include <blaze/util/TrueType.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename T >
63 struct IsColumnMajorMatrixHelper
64 {
65  private:
66  //**********************************************************************************************
67  static T* create();
68 
69  template< typename MT >
70  static TrueType test( const Matrix<MT,columnMajor>* );
71 
72  template< typename MT >
73  static TrueType test( const volatile Matrix<MT,columnMajor>* );
74 
75  static FalseType test( ... );
76  //**********************************************************************************************
77 
78  public:
79  //**********************************************************************************************
80  using Type = decltype( test( create() ) );
81  //**********************************************************************************************
82 };
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
112 template< typename T >
114  : public IsColumnMajorMatrixHelper<T>::Type
115 {};
116 //*************************************************************************************************
117 
118 
119 //*************************************************************************************************
124 template< typename T >
125 struct IsColumnMajorMatrix<T&>
126  : public FalseType
127 {};
129 //*************************************************************************************************
130 
131 
132 //*************************************************************************************************
145 template< typename T >
147 //*************************************************************************************************
148 
149 } // namespace blaze
150 
151 #endif
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
Header file for the FalseType type/value trait base class.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the matrix storage order types.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsColumnMajorMatrix_v
Auxiliary variable template for the IsColumnMajorMatrix type trait.The IsColumnMajorMatrix_v variable...
Definition: IsColumnMajorMatrix.h:146
Header file for the Matrix base class.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:113
Header file for the TrueType type/value trait base class.