Blaze 3.9
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
39namespace blaze {
40
41//=================================================================================================
42//
43// CLASS DEFINITION
44//
45//=================================================================================================
46
47//*************************************************************************************************
94template< bool Condition // Compile time condition
95 , typename T=void > // The type to be instantiated
97{
98 //**********************************************************************************************
99 using Type = T;
100 //**********************************************************************************************
101};
102//*************************************************************************************************
103
104
105//*************************************************************************************************
116template< typename T > // The type to be instantiated
117struct EnableIf<false,T>
118{};
120//*************************************************************************************************
121
122
123//*************************************************************************************************
136template< bool Condition // Compile time condition
137 , typename T=void > // The type to be instantiated
139//*************************************************************************************************
140
141
142//*************************************************************************************************
154template< bool Condition // Compile time condition
155 , typename T=void > // The type to be instantiated
157//*************************************************************************************************
158
159
160//*************************************************************************************************
173template< bool Condition // Compile time condition
174 , typename T=void > // The type to be instantiated
176//*************************************************************************************************
177
178} // namespace blaze
179
180#endif
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
Substitution Failure Is Not An Error (SFINAE) class.
Definition: EnableIf.h:97
T Type
The instantiated type.
Definition: EnableIf.h:99