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
139 //*************************************************************************************************
140 
141 } // namespace blaze
142 
143 #endif
T Type
The instantiated type.
Definition: EnableIf.h:99
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:96