All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EnableIf.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_ENABLEIF_H_
23 #define _BLAZE_UTIL_ENABLEIF_H_
24 
25 
26 namespace blaze {
27 
28 //=================================================================================================
29 //
30 // CLASS DEFINITION
31 //
32 //=================================================================================================
33 
34 //*************************************************************************************************
81 template< bool Condition // Compile time condition
82  , typename T=void > // The type to be instantiated
84 {
85  //**********************************************************************************************
86  typedef T Type;
87  //**********************************************************************************************
88 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
103 template< typename T > // The type to be instantiated
104 struct EnableIfTrue<false,T>
105 {};
107 //*************************************************************************************************
108 
109 
110 
111 
112 //=================================================================================================
113 //
114 // CLASS DEFINITION
115 //
116 //=================================================================================================
117 
118 //*************************************************************************************************
169 template< typename Condition // Compile time condition
170  , typename T=void > // The type to be instantiated
171 struct EnableIf : public EnableIfTrue<Condition::value,T>
172 {};
173 //*************************************************************************************************
174 
175 } // namespace blaze
176 
177 #endif