Blaze 3.9
UnderlyingElement.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_UNDERLYINGELEMENT_H_
36#define _BLAZE_MATH_TYPETRAITS_UNDERLYINGELEMENT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <blaze/util/Complex.h>
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
58template< typename, typename = void > struct UnderlyingElementHelper1;
59template< typename, typename = void > struct UnderlyingElementHelper2;
61//*************************************************************************************************
62
63
64//*************************************************************************************************
92template< typename T >
94{
95 public:
96 //**********************************************************************************************
98 using Type = typename UnderlyingElementHelper1< RemoveCV_t<T> >::Type;
100 //**********************************************************************************************
101};
102//*************************************************************************************************
103
104
105//*************************************************************************************************
118template< typename T >
120//*************************************************************************************************
121
122
123//*************************************************************************************************
128template< typename T, typename >
129struct UnderlyingElementHelper1
130{
131 using Type = typename UnderlyingElementHelper2<T>::Type;
132};
133
134template< typename T >
135struct UnderlyingElementHelper1< complex<T> >
136{
137 using Type = T;
138};
139
140template< typename T >
141struct UnderlyingElementHelper1< T, Void_t< typename T::ElementType > >
142{
143 using Type = typename T::ElementType;
144};
146//*************************************************************************************************
147
148
149//*************************************************************************************************
154template< typename T, typename >
155struct UnderlyingElementHelper2
156{
157 using Type = T;
158};
159
160template< typename T >
161struct UnderlyingElementHelper2< T, Void_t< typename T::value_type > >
162{
163 using Type = typename T::value_type;
164};
166//*************************************************************************************************
167
168} // namespace blaze
169
170#endif
Header file for the complex data type.
Header file for the RemoveCV type trait.
Complex data type of the Blaze library.
typename UnderlyingElement< T >::Type UnderlyingElement_t
Auxiliary alias declaration for the UnderlyingElement type trait.
Definition: UnderlyingElement.h:119
void Void_t
Compile time type check.
Definition: Void.h:64
Evaluation of the element type of a given data type.
Definition: UnderlyingElement.h:94
Header file for the Void type trait.