Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
EnableIf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_ENABLEIF_H_
36
#define _BLAZE_UTIL_ENABLEIF_H_
37
38
39
namespace
blaze {
40
41
//=================================================================================================
42
//
43
// CLASS DEFINITION
44
//
45
//=================================================================================================
46
47
//*************************************************************************************************
94
template
<
bool
Condition
// Compile time condition
95
,
typename
T=
void
>
// The type to be instantiated
96
struct
EnableIf
97
{
98
//**********************************************************************************************
99
using
Type
= T;
100
//**********************************************************************************************
101
};
102
//*************************************************************************************************
103
104
105
//*************************************************************************************************
116
template
<
typename
T >
// The type to be instantiated
117
struct
EnableIf
<false,T>
118
{};
120
//*************************************************************************************************
121
122
123
//*************************************************************************************************
136
template
<
bool
Condition
// Compile time condition
137
,
typename
T=
void
>
// The type to be instantiated
138
using
EnableIf_t
=
typename
EnableIf<Condition,T>::Type
;
139
//*************************************************************************************************
140
141
142
//*************************************************************************************************
154
template
<
bool
Condition
// Compile time condition
155
,
typename
T=
void
>
// The type to be instantiated
156
using
DisableIf
=
EnableIf<!Condition,T>
;
157
//*************************************************************************************************
158
159
160
//*************************************************************************************************
173
template
<
bool
Condition
// Compile time condition
174
,
typename
T=
void
>
// The type to be instantiated
175
using
DisableIf_t
=
typename
EnableIf<!Condition,T>::Type
;
176
//*************************************************************************************************
177
178
}
// namespace blaze
179
180
#endif
blaze::EnableIf_t
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:138
blaze::DisableIf
EnableIf<!Condition, T > DisableIf
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:156
blaze::DisableIf_t
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:175
blaze::EnableIf
Substitution Failure Is Not An Error (SFINAE) class.
Definition
EnableIf.h:97
blaze::EnableIf::Type
T Type
The instantiated type.
Definition
EnableIf.h:99
Generated by
1.18.0