Blaze 3.9
Contains.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_TYPELIST_CONTAINS_H_
36#define _BLAZE_UTIL_TYPELIST_CONTAINS_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
45
46
47namespace blaze {
48
49//=================================================================================================
50//
51// CLASS DEFINITION
52//
53//=================================================================================================
54
55//*************************************************************************************************
75template< typename TL // Type of the type list
76 , typename T > // The search type
77struct Contains;
78//*************************************************************************************************
79
80
81//*************************************************************************************************
86template< typename T > // The search type
87struct Contains< TypeList<>, T >
88 : public FalseType
89{};
91//*************************************************************************************************
92
93
94//*************************************************************************************************
99template< typename T // The search type
100 , typename... Ts > // Types of the tail of the type list
101struct Contains< TypeList<T,Ts...>, T >
102 : public TrueType
103{};
105//*************************************************************************************************
106
107
108//*************************************************************************************************
113template< typename U // Type of the head of the type list
114 , typename... Ts // Types of the tail of the type list
115 , typename T > // The search type
116struct Contains< TypeList<U,Ts...>, T >
117 : public Contains< TypeList<Ts...>, T >
118{};
120//*************************************************************************************************
121
122
123//*************************************************************************************************
136template< typename TL // Type of the type list
137 , typename T > // The search type
139//*************************************************************************************************
140
141} // namespace blaze
142
143#endif
Header file for the IntegralConstant class template.
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.
Definition: Contains.h:138
Searching a type list.
Definition: Contains.h:77
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Implementation of a type list.
Definition: TypeList.h:120
Header file for the TypeList class template.