Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typelist
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/IntegralConstant.h
>
44
#include <
blaze/util/typelist/TypeList.h
>
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
138
constexpr
bool
Contains_v
=
Contains<TL,T>::value
;
139
//*************************************************************************************************
140
141
}
// namespace blaze
142
143
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
blaze::Contains_v
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.
Definition
Contains.h:138
blaze::FalseType
BoolConstant< false > FalseType
Type/value traits base class.
Definition
IntegralConstant.h:121
blaze::TrueType
BoolConstant< true > TrueType
Type traits base class.
Definition
IntegralConstant.h:132
blaze::Contains
Searching a type list.
Definition
Contains.h:77
blaze::TypeList
Implementation of a type list.
Definition
TypeList.h:120
TypeList.h
Header file for the TypeList class template.
Generated by
1.18.0