Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
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/EnableIf.h
>
44
#include <
blaze/util/typetraits/IsSame.h
>
45
#include <
blaze/util/typetraits/RemoveCV.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
58
template
<
typename
,
typename
=
void
>
struct
UnderlyingBuiltinHelper1;
59
template
<
typename
,
typename
=
void
>
struct
UnderlyingBuiltinHelper2;
61
//*************************************************************************************************
62
63
64
//*************************************************************************************************
90
template
<
typename
T >
91
struct
UnderlyingBuiltin
92
{
93
public
:
94
//**********************************************************************************************
96
using
Type
=
typename
UnderlyingBuiltinHelper1< RemoveCV_t<T> >
::Type
;
98
//**********************************************************************************************
99
};
100
//*************************************************************************************************
101
102
103
//*************************************************************************************************
116
template
<
typename
T >
117
using
UnderlyingBuiltin_t
=
typename
UnderlyingBuiltin<T>::Type
;
118
//*************************************************************************************************
119
120
121
//*************************************************************************************************
126
template
<
typename
T,
typename
>
127
struct
UnderlyingBuiltinHelper1
128
{
129
using
Type
=
typename
UnderlyingBuiltinHelper2<T>::Type;
130
};
131
132
template
<
typename
T >
133
struct
UnderlyingBuiltinHelper1< T,
EnableIf_t
< !
IsSame_v
< T, typename T::ElementType > > >
134
{
135
using
Type =
typename
UnderlyingBuiltinHelper1< typename T::ElementType >::Type;
136
};
138
//*************************************************************************************************
139
140
141
//*************************************************************************************************
146
template
<
typename
T,
typename
>
147
struct
UnderlyingBuiltinHelper2
148
{
149
using
Type = T;
150
};
151
152
template
<
typename
T >
153
struct
UnderlyingBuiltinHelper2< T,
EnableIf_t
< !
IsSame_v
< T, typename T::value_type > > >
154
{
155
using
Type =
typename
UnderlyingBuiltinHelper1< typename T::value_type >::Type;
156
};
158
//*************************************************************************************************
159
160
}
// namespace blaze
161
162
#endif
EnableIf.h
Header file for the EnableIf class template.
IsSame.h
Header file for the IsSame and IsStrictlySame type traits.
RemoveCV.h
Header file for the RemoveCV type trait.
blaze::Type
blaze::UnderlyingBuiltin_t
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.
Definition
UnderlyingBuiltin.h:117
blaze::IsSame_v
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition
IsSame.h:159
blaze::EnableIf_t
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:138
blaze::UnderlyingBuiltin
Evaluation of the underlying builtin element type of a given data type.
Definition
UnderlyingBuiltin.h:92
Generated by
1.18.0