Blaze  3.6
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 
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
57 template< typename, typename = void > struct UnderlyingBuiltinHelper1;
58 template< typename, typename = void > struct UnderlyingBuiltinHelper2;
60 //*************************************************************************************************
61 
62 
63 //*************************************************************************************************
89 template< typename T >
91 {
92  public:
93  //**********************************************************************************************
95  using Type = typename UnderlyingBuiltinHelper1< RemoveCV_t<T> >::Type;
97  //**********************************************************************************************
98 };
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
115 template< typename T >
117 //*************************************************************************************************
118 
119 
120 //*************************************************************************************************
125 template< typename T, typename >
126 struct UnderlyingBuiltinHelper1
127 {
128  using Type = typename UnderlyingBuiltinHelper2<T>::Type;
129 };
130 
131 template< typename T >
132 struct UnderlyingBuiltinHelper1< T, Void_t< typename T::ElementType > >
133 {
134  using Type = typename UnderlyingBuiltinHelper1< typename T::ElementType >::Type;
135 };
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
145 template< typename T, typename >
146 struct UnderlyingBuiltinHelper2
147 {
148  using Type = T;
149 };
150 
151 template< typename T >
152 struct UnderlyingBuiltinHelper2< T, Void_t< typename T::value_type > >
153 {
154  using Type = typename UnderlyingBuiltinHelper1< typename T::value_type >::Type;
155 };
157 //*************************************************************************************************
158 
159 } // namespace blaze
160 
161 #endif
Header file for the Void type trait.
Header file for the RemoveCV type trait.
void Void_t
Compile time type check.This type trait maps an arbitrary sequence of types to the type void....
Definition: Void.h:64
Evaluation of the underlying builtin element type of a given data type.This type trait evaluates the ...
Definition: UnderlyingBuiltin.h:90
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_t alias declar...
Definition: UnderlyingBuiltin.h:116