Length.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPELIST_LENGTH_H_
36 #define _BLAZE_UTIL_TYPELIST_LENGTH_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/mpl/SizeT.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
70 template< typename TL > // Type of the type list
71 struct Length;
72 //*************************************************************************************************
73 
74 
75 //*************************************************************************************************
80 template< typename... Ts > // Type list elements
81 struct Length< TypeList<Ts...> >
82  : public SizeT< sizeof...( Ts ) >
83 {};
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
101 template< typename TL > // Type of the type list
102 constexpr size_t Length_v = Length<TL>::value;
103 //*************************************************************************************************
104 
105 } // namespace blaze
106 
107 #endif
constexpr size_t Length_v
Auxiliary variable template for the Length type trait.The Length_v variable template provides a conve...
Definition: Length.h:102
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the SizeT class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Implementation of a type list.The TypeList class template represents a list of data types of arbitrar...
Definition: TypeList.h:119
Calculating the length of a type list.The Length class can be used to obtain the length of a type lis...
Definition: Length.h:71
Header file for the TypeList class template.