IsRowVector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISROWVECTOR_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISROWVECTOR_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 IsRowVectorHelper
64 {
65  private:
66  //**********************************************************************************************
67  static T* create();
68 
69  template< typename VT >
70  static TrueType test( const Vector<VT,rowVector>* );
71 
72  template< typename VT >
73  static TrueType test( const volatile Vector<VT,rowVector>* );
74 
75  static FalseType test( ... );
76  //**********************************************************************************************
77 
78  public:
79  //**********************************************************************************************
80  using Type = decltype( test( create() ) );
81  //**********************************************************************************************
82 };
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
109 template< typename T >
111  : public IsRowVectorHelper<T>::Type
112 {};
113 //*************************************************************************************************
114 
115 
116 //*************************************************************************************************
121 template< typename T >
122 struct IsRowVector<T&>
123  : public FalseType
124 {};
126 //*************************************************************************************************
127 
128 
129 //*************************************************************************************************
142 template< typename T >
144 //*************************************************************************************************
145 
146 } // namespace blaze
147 
148 #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
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:110
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 vector transpose flag types.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsRowVector_v
Auxiliary variable template for the IsRowVector type trait.The IsRowVector_v variable template provid...
Definition: IsRowVector.h:143
Header file for the Vector CRTP base class.
Header file for the TrueType type/value trait base class.