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
97 {
98  //**********************************************************************************************
99  using Type = T;
100  //**********************************************************************************************
101 };
102 //*************************************************************************************************
103 
104 
105 //*************************************************************************************************
116 template< typename T > // The type to be instantiated
117 struct EnableIfTrue<false,T>
118 {};
120 //*************************************************************************************************
121 
122 
123 //*************************************************************************************************
136 template< bool Condition // Compile time condition
137  , typename T=void > // The type to be instantiated
139 //*************************************************************************************************
140 
141 
142 
143 
144 //=================================================================================================
145 //
146 // CLASS DEFINITION
147 //
148 //=================================================================================================
149 
150 //*************************************************************************************************
201 template< typename Condition // Compile time condition
202  , typename T=void > // The type to be instantiated
203 struct EnableIf
204  : public EnableIfTrue<Condition::value,T>
205 {};
206 //*************************************************************************************************
207 
208 
209 //*************************************************************************************************
222 template< typename Condition // Compile time condition
223  , typename T=void > // The type to be instantiated
225 //*************************************************************************************************
226 
227 } // namespace blaze
228 
229 #endif
T Type
The instantiated type.
Definition: EnableIf.h:99
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
typename EnableIfTrue< Condition, T >::Type EnableIfTrue_
Auxiliary type for the EnableIfTrue class template.The EnableIfTrue_ alias declaration provides a con...
Definition: EnableIf.h:138
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:203
Substitution Failure Is Not An Error (SFINAE) class.The EnableIfTrue class template is an auxiliary t...
Definition: EnableIf.h:96
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224