Blaze  3.6
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 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
75 template< typename TL // Type of the type list
76  , typename T > // The search type
77 struct Contains;
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
86 template< typename T > // The search type
87 struct Contains< TypeList<>, T >
88  : public FalseType
89 {};
91 //*************************************************************************************************
92 
93 
94 //*************************************************************************************************
99 template< typename T // The search type
100  , typename... Ts > // Types of the tail of the type list
101 struct Contains< TypeList<T,Ts...>, T >
102  : public TrueType
103 {};
105 //*************************************************************************************************
106 
107 
108 //*************************************************************************************************
113 template< 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
116 struct Contains< TypeList<U,Ts...>, T >
117  : public Contains< TypeList<Ts...>, T >
118 {};
120 //*************************************************************************************************
121 
122 
123 //*************************************************************************************************
136 template< typename TL // Type of the type list
137  , typename T > // The search type
139 //*************************************************************************************************
140 
141 } // namespace blaze
142 
143 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:138
Implementation of a type list.The TypeList class template represents a list of data types of arbitrar...
Definition: TypeList.h:119
Header file for the TypeList class template.
Header file for the IntegralConstant class template.
Searching a type list.The Contains class can be used to search the type list for a particular type Ty...
Definition: Contains.h:77