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  typedef T Type;
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 
124 
125 //=================================================================================================
126 //
127 // CLASS DEFINITION
128 //
129 //=================================================================================================
130 
131 //*************************************************************************************************
182 template< typename Condition // Compile time condition
183  , typename T=void > // The type to be instantiated
184 struct EnableIf : public EnableIfTrue<Condition::value,T>
185 {};
186 //*************************************************************************************************
187 
188 } // namespace blaze
189 
190 #endif
T Type
The instantiated type.
Definition: EnableIf.h:99
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Substitution Failure Is Not An Error (SFINAE) class.The EnableIfTrue class template is an auxiliary t...
Definition: EnableIf.h:96