Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
traits
ExpandTrait.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TRAITS_EXPANDTRAIT_H_
36
#define _BLAZE_MATH_TRAITS_EXPANDTRAIT_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <utility>
44
#include <
blaze/math/Infinity.h
>
45
#include <
blaze/util/Types.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
58
template
<
typename
,
size_t
... >
struct
ExpandTrait
;
59
template
<
typename
,
size_t
,
typename
=
void
>
struct
ExpandTraitEval1;
60
template
<
typename
,
size_t
,
typename
=
void
>
struct
ExpandTraitEval2;
62
//*************************************************************************************************
63
64
65
//*************************************************************************************************
67
template
<
size_t
E,
typename
T >
68
auto
evalExpandTrait(
const
volatile
T& ) -> ExpandTraitEval1<T,E>;
69
70
template
<
typename
T >
71
auto
evalExpandTrait(
const
volatile
T& ) -> ExpandTraitEval1<T,inf>;
73
//*************************************************************************************************
74
75
76
//*************************************************************************************************
122
template
<
typename
T
// Type of the operand
123
,
size_t
... CEAs >
// Compile time expansion arguments
124
struct
ExpandTrait
125
:
public
decltype( evalExpandTrait<CEAs...>( std::declval<T&>() ) )
126
{};
127
//*************************************************************************************************
128
129
130
//*************************************************************************************************
143
template
<
typename
T
// Type of the operand
144
,
size_t
... CEAs >
// Compile time expansion arguments
145
using
ExpandTrait_t
=
typename
ExpandTrait
<T,CEAs...>
::Type
;
146
//*************************************************************************************************
147
148
149
//*************************************************************************************************
154
template
<
typename
T
// Type of the operand
155
,
size_t
E
// Compile time expansion
156
,
typename
>
// Restricting condition
157
struct
ExpandTraitEval1
158
:
public
ExpandTraitEval2<T,E>
159
{};
161
//*************************************************************************************************
162
163
164
//*************************************************************************************************
169
template
<
typename
T
// Type of the operand
170
,
size_t
E
// Compile time expansion
171
,
typename
>
// Restricting condition
172
struct
ExpandTraitEval2
173
{};
175
//*************************************************************************************************
176
177
}
// namespace blaze
178
179
#endif
Infinity.h
Numerical infinity for built-in data types.
blaze::Type
blaze::ExpandTrait_t
typename ExpandTrait< T, CEAs... >::Type ExpandTrait_t
Auxiliary alias declaration for the ExpandTrait type trait.
Definition
ExpandTrait.h:145
blaze::ExpandTrait
Base template for the ExpandTrait class.
Definition
ExpandTrait.h:126
Types.h
Header file for basic type definitions.
Generated by
1.18.0