Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
UnderlyingScalar.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_UNDERLYINGSCALAR_H_
36
#define _BLAZE_MATH_TYPETRAITS_UNDERLYINGSCALAR_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
UnderlyingScalarHelper;
60
//*************************************************************************************************
61
62
63
//*************************************************************************************************
89
template
<
typename
T >
90
struct
UnderlyingScalar
91
{
92
public
:
93
//**********************************************************************************************
95
using
Type
=
typename
UnderlyingScalarHelper< RemoveCV_t<T> >
::Type
;
97
//**********************************************************************************************
98
};
99
//*************************************************************************************************
100
101
102
//*************************************************************************************************
115
template
<
typename
T >
116
using
UnderlyingScalar_t
=
typename
UnderlyingScalar<T>::Type
;
117
//*************************************************************************************************
118
119
120
//*************************************************************************************************
125
template
<
typename
T,
typename
>
126
struct
UnderlyingScalarHelper
127
{
128
using
Type
= T;
129
};
130
131
template
<
typename
T >
132
struct
UnderlyingScalarHelper< T,
EnableIf_t
< !
IsSame_v
< T, typename T::ElementType > > >
133
{
134
using
Type =
typename
UnderlyingScalarHelper< typename T::ElementType >::Type;
135
};
137
//*************************************************************************************************
138
139
}
// namespace blaze
140
141
#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::UnderlyingScalar_t
typename UnderlyingScalar< T >::Type UnderlyingScalar_t
Auxiliary alias declaration for the UnderlyingScalar type trait.
Definition
UnderlyingScalar.h:116
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::UnderlyingScalar
Evaluation of the underlying scalar element type of a given data type.
Definition
UnderlyingScalar.h:91
Generated by
1.18.0