Blaze 3.9
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
45
46
47namespace blaze {
48
49//=================================================================================================
50//
51// CLASS DEFINITION
52//
53//=================================================================================================
54
55//*************************************************************************************************
70template< typename TL > // Type of the type list
71struct Length;
72//*************************************************************************************************
73
74
75//*************************************************************************************************
80template< typename... Ts > // Type list elements
81struct Length< TypeList<Ts...> >
82 : public Size_t< sizeof...( Ts ) >
83{};
85//*************************************************************************************************
86
87
88//*************************************************************************************************
101template< typename TL > // Type of the type list
102constexpr size_t Length_v = Length<TL>::value;
103//*************************************************************************************************
104
105} // namespace blaze
106
107#endif
Header file for the IntegralConstant class template.
constexpr size_t Length_v
Auxiliary variable template for the Length type trait.
Definition: Length.h:102
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Calculating the length of a type list.
Definition: Length.h:71
Implementation of a type list.
Definition: TypeList.h:120
Header file for the TypeList class template.