All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SelectType.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_SELECTTYPE_H_
23 #define _BLAZE_UTIL_SELECTTYPE_H_
24 
25 
26 namespace blaze {
27 
28 //=================================================================================================
29 //
30 // CLASS DEFINITION
31 //
32 //=================================================================================================
33 
34 //*************************************************************************************************
43 template< bool Select // Compile time selection
44  , typename T1 // Type to be selected if Select=true
45  , typename T2 > // Type to be selected if Select=false
46 struct SelectType
47 {
48  public:
49  //**********************************************************************************************
51  typedef T1 Type;
52 
53  //**********************************************************************************************
54 };
55 //*************************************************************************************************
56 
57 
58 //*************************************************************************************************
67 template< typename T1 // Type not to be selected
68  , typename T2 > // Type to be selected
69 struct SelectType<false,T1,T2>
70 {
71  public:
72  //**********************************************************************************************
73  typedef T2 Type;
74  //**********************************************************************************************
75 };
77 //*************************************************************************************************
78 
79 } // namespace blaze
80 
81 #endif