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 
43 #include <blaze/util/FalseType.h>
44 #include <blaze/util/TrueType.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
76 template< typename TL // Type of the type list
77  , typename T > // The search type
78 struct Contains;
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
87 template< typename T > // The search type
88 struct Contains< TypeList<>, T >
89  : public FalseType
90 {};
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
100 template< typename T // The search type
101  , typename... Ts > // Types of the tail of the type list
102 struct Contains< TypeList<T,Ts...>, T >
103  : public TrueType
104 {};
106 //*************************************************************************************************
107 
108 
109 //*************************************************************************************************
114 template< typename U // Type of the head of the type list
115  , typename... Ts // Types of the tail of the type list
116  , typename T > // The search type
117 struct Contains< TypeList<U,Ts...>, T >
118  : public Contains< TypeList<Ts...>, T >
119 {};
121 //*************************************************************************************************
122 
123 } // namespace blaze
124 
125 #endif
Header file for the FalseType type/value trait base class.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
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
Header file for the TypeList 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:78
Header file for the TrueType type/value trait base class.