UnderlyingBuiltin.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_UNDERLYINGBUILTIN_H_
36 #define _BLAZE_MATH_TYPETRAITS_UNDERLYINGBUILTIN_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/mpl/If.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
79 template< typename T >
81 {
82  private:
83  //**struct Builtin******************************************************************************
85  template< typename T2 >
86  struct Builtin { typedef T2 Type; };
88  //**********************************************************************************************
89 
90  //**struct Complex******************************************************************************
92  template< typename T2 >
93  struct Complex { typedef typename UnderlyingBuiltin<typename T2::value_type>::Type Type; };
95  //**********************************************************************************************
96 
97  //**struct Other********************************************************************************
99  template< typename T2 >
100  struct Other { typedef typename UnderlyingBuiltin<typename T2::ElementType>::Type Type; };
102  //**********************************************************************************************
103 
104  public:
105  //**********************************************************************************************
107  typedef typename If_< IsBuiltin<T>
108  , Builtin<T>
110  , Complex<T>
111  , Other<T> >
112  >::Type Type;
114  //**********************************************************************************************
115 };
116 //*************************************************************************************************
117 
118 
119 //*************************************************************************************************
132 template< typename T >
134 //*************************************************************************************************
135 
136 } // namespace blaze
137 
138 #endif
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_ alias declara...
Definition: UnderlyingBuiltin.h:133
Evaluation of the underlying builtin element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingBuiltin.h:80
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the IsBuiltin type trait.
Header file for the IsComplex type trait.