SelectType.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_SELECTTYPE_H_
36 #define _BLAZE_UTIL_SELECTTYPE_H_
37 
38 
39 namespace blaze {
40 
41 //=================================================================================================
42 //
43 // CLASS DEFINITION
44 //
45 //=================================================================================================
46 
47 //*************************************************************************************************
56 template< bool Select // Compile time selection
57  , typename T1 // Type to be selected if Select=true
58  , typename T2 > // Type to be selected if Select=false
59 struct SelectType
60 {
61  public:
62  //**********************************************************************************************
64  typedef T1 Type;
65 
66  //**********************************************************************************************
67 };
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
80 template< typename T1 // Type not to be selected
81  , typename T2 > // Type to be selected
82 struct SelectType<false,T1,T2>
83 {
84  public:
85  //**********************************************************************************************
86  typedef T2 Type;
87  //**********************************************************************************************
88 };
90 //*************************************************************************************************
91 
92 } // namespace blaze
93 
94 #endif
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57