Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typelist
ContainsRelated.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_TYPELIST_CONTAINSRELATED_H_
36
#define _BLAZE_UTIL_TYPELIST_CONTAINSRELATED_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/util/IntegralConstant.h
>
44
#include <
blaze/util/mpl/If.h
>
45
#include <
blaze/util/typelist/TypeList.h
>
46
#include <
blaze/util/typetraits/IsConvertible.h
>
47
48
49
namespace
blaze {
50
51
//=================================================================================================
52
//
53
// CLASS TEMPLATE
54
//
55
//=================================================================================================
56
57
//*************************************************************************************************
88
template
<
typename
TL
// Type of the type list
89
,
typename
T >
// The search type
90
struct
ContainsRelated
;
91
//*************************************************************************************************
92
93
94
//*************************************************************************************************
99
template
<
typename
T >
// The search type
100
struct
ContainsRelated
<
TypeList
<>, T >
101
:
public
FalseType
102
{};
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
112
template
<
typename
U
// Type of the head of the type list
113
,
typename
... Ts
// Types of the tail of the type list
114
,
typename
T >
// The search type
115
struct
ContainsRelated
<
TypeList
<U,Ts...>, T >
116
:
public
If_t
< IsConvertible_v<T,U>
117
, TrueType
118
, ContainsRelated< TypeList<Ts...>, T > >
119
{};
121
//*************************************************************************************************
122
123
124
//*************************************************************************************************
137
template
<
typename
TL
// Type of the type list
138
,
typename
T >
// The search type
139
constexpr
bool
ContainsRelated_v
=
ContainsRelated<TL,T>::value
;
140
//*************************************************************************************************
141
142
}
// namespace blaze
143
144
#endif
If.h
Header file for the If class template.
IntegralConstant.h
Header file for the IntegralConstant class template.
IsConvertible.h
Header file for the IsConvertible type trait.
blaze::ContainsRelated_v
constexpr bool ContainsRelated_v
Auxiliary variable template for the ContainsRelated type trait.
Definition
ContainsRelated.h:139
blaze::FalseType
BoolConstant< false > FalseType
Type/value traits base class.
Definition
IntegralConstant.h:121
blaze::If_t
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition
If.h:108
blaze::ContainsRelated
Searching a type list.
Definition
ContainsRelated.h:90
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