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 { using Type = T2; };
88  //**********************************************************************************************
89 
90  //**struct Complex******************************************************************************
92  template< typename T2 >
93  struct Complex { using Type = typename UnderlyingBuiltin<typename T2::value_type>::Type; };
95  //**********************************************************************************************
96 
97  //**struct Other********************************************************************************
99  template< typename T2 >
100  struct Other { using Type = typename UnderlyingBuiltin<typename T2::ElementType>::Type; };
102  //**********************************************************************************************
103 
104  public:
105  //**********************************************************************************************
107  using Type = typename If_t< IsBuiltin_v<T>
108  , Builtin<T>
110  , Complex<T>
111  , Other<T> >
112  >::Type;
114  //**********************************************************************************************
115 };
116 //*************************************************************************************************
117 
118 
119 //*************************************************************************************************
132 template< typename T >
134 //*************************************************************************************************
135 
136 } // namespace blaze
137 
138 #endif
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
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:58
Header file for the If class template.
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_t alias declar...
Definition: UnderlyingBuiltin.h:133
Header file for the IsBuiltin type trait.
Header file for the IsComplex type trait.