Blaze  3.6
IsColumnVector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOLUMNVECTOR_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISCOLUMNVECTOR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
61 template< typename T >
62 struct IsColumnVectorHelper
63 {
64  private:
65  //**********************************************************************************************
66  static T* create();
67 
68  template< typename VT >
69  static TrueType test( const Vector<VT,columnVector>* );
70 
71  template< typename VT >
72  static TrueType test( const volatile Vector<VT,columnVector>* );
73 
74  static FalseType test( ... );
75  //**********************************************************************************************
76 
77  public:
78  //**********************************************************************************************
79  using Type = decltype( test( create() ) );
80  //**********************************************************************************************
81 };
83 //*************************************************************************************************
84 
85 
86 //*************************************************************************************************
108 template< typename T >
110  : public IsColumnVectorHelper<T>::Type
111 {};
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
120 template< typename T >
121 struct IsColumnVector<T&>
122  : public FalseType
123 {};
125 //*************************************************************************************************
126 
127 
128 //*************************************************************************************************
141 template< typename T >
143 //*************************************************************************************************
144 
145 } // namespace blaze
146 
147 #endif
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Header file for the vector transpose flag types.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:109
Header file for all forward declarations for expression class templates.
Header file for the IntegralConstant class template.
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.The IsColumnVector_v variable template ...
Definition: IsColumnVector.h:142