Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
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
>
44
#include <
blaze/util/typetraits/RemoveCV.h
>
45
#include <
blaze/util/typetraits/Void.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
58
template
<
typename
,
typename
=
void
>
struct
UnderlyingElementHelper1;
59
template
<
typename
,
typename
=
void
>
struct
UnderlyingElementHelper2;
61
//*************************************************************************************************
62
63
64
//*************************************************************************************************
92
template
<
typename
T >
93
struct
UnderlyingElement
94
{
95
public
:
96
//**********************************************************************************************
98
using
Type
=
typename
UnderlyingElementHelper1< RemoveCV_t<T> >
::Type
;
100
//**********************************************************************************************
101
};
102
//*************************************************************************************************
103
104
105
//*************************************************************************************************
118
template
<
typename
T >
119
using
UnderlyingElement_t
=
typename
UnderlyingElement<T>::Type
;
120
//*************************************************************************************************
121
122
123
//*************************************************************************************************
128
template
<
typename
T,
typename
>
129
struct
UnderlyingElementHelper1
130
{
131
using
Type
=
typename
UnderlyingElementHelper2<T>::Type;
132
};
133
134
template
<
typename
T >
135
struct
UnderlyingElementHelper1<
complex
<T> >
136
{
137
using
Type = T;
138
};
139
140
template
<
typename
T >
141
struct
UnderlyingElementHelper1< T,
Void_t
< typename T::ElementType > >
142
{
143
using
Type =
typename
T::ElementType;
144
};
146
//*************************************************************************************************
147
148
149
//*************************************************************************************************
154
template
<
typename
T,
typename
>
155
struct
UnderlyingElementHelper2
156
{
157
using
Type = T;
158
};
159
160
template
<
typename
T >
161
struct
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
Complex.h
Header file for the complex data type.
RemoveCV.h
Header file for the RemoveCV type trait.
blaze::Type
complex
Complex data type of the Blaze library.
blaze::UnderlyingElement_t
typename UnderlyingElement< T >::Type UnderlyingElement_t
Auxiliary alias declaration for the UnderlyingElement type trait.
Definition
UnderlyingElement.h:119
blaze::Void_t
void Void_t
Compile time type check.
Definition
Void.h:64
blaze::UnderlyingElement
Evaluation of the element type of a given data type.
Definition
UnderlyingElement.h:94
Void.h
Header file for the Void type trait.
Generated by
1.18.0