RowsTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_ROWSTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_ROWSTRAIT_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>
46 #include <blaze/util/Types.h>
51 
52 
53 namespace blaze {
54 
55 //=================================================================================================
56 //
57 // CLASS DEFINITION
58 //
59 //=================================================================================================
60 
61 //*************************************************************************************************
107 template< typename MT // Type of the matrix
108  , size_t... CRAs > // Compile time row arguments
109 struct RowsTrait
110 {
111  private:
112  //**********************************************************************************************
114  struct Failure { using Type = INVALID_TYPE; };
116  //**********************************************************************************************
117 
118  public:
119  //**********************************************************************************************
121  using Type = typename If_< Or< IsConst<MT>, IsVolatile<MT>, IsReference<MT> >
122  , RowsTrait< Decay_<MT>, CRAs... >
123  , Failure >::Type;
125  //**********************************************************************************************
126 };
127 //*************************************************************************************************
128 
129 
130 //*************************************************************************************************
143 template< typename MT // Type of the matrix
144  , size_t... CRAs > // Compile time row arguments
145 using RowsTrait_ = typename RowsTrait<MT,CRAs...>::Type;
146 //*************************************************************************************************
147 
148 } // namespace blaze
149 
150 #endif
Header file for basic type definitions.
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Header file for the IsVolatile type trait.
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the Or class template.
typename RowsTrait< MT, CRAs... >::Type RowsTrait_
Auxiliary alias declaration for the RowsTrait type trait.The RowsTrait_ alias declaration provides a ...
Definition: RowsTrait.h:145
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 type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75