Blaze 3.9
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
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
58template< typename, size_t... > struct ExpandTrait;
59template< typename, size_t, typename = void > struct ExpandTraitEval1;
60template< typename, size_t, typename = void > struct ExpandTraitEval2;
62//*************************************************************************************************
63
64
65//*************************************************************************************************
67template< size_t E, typename T >
68auto evalExpandTrait( const volatile T& ) -> ExpandTraitEval1<T,E>;
69
70template< typename T >
71auto evalExpandTrait( const volatile T& ) -> ExpandTraitEval1<T,inf>;
73//*************************************************************************************************
74
75
76//*************************************************************************************************
122template< typename T // Type of the operand
123 , size_t... CEAs > // Compile time expansion arguments
125 : public decltype( evalExpandTrait<CEAs...>( std::declval<T&>() ) )
126{};
127//*************************************************************************************************
128
129
130//*************************************************************************************************
143template< typename T // Type of the operand
144 , size_t... CEAs > // Compile time expansion arguments
145using ExpandTrait_t = typename ExpandTrait<T,CEAs...>::Type;
146//*************************************************************************************************
147
148
149//*************************************************************************************************
154template< typename T // Type of the operand
155 , size_t E // Compile time expansion
156 , typename > // Restricting condition
157struct ExpandTraitEval1
158 : public ExpandTraitEval2<T,E>
159{};
161//*************************************************************************************************
162
163
164//*************************************************************************************************
169template< typename T // Type of the operand
170 , size_t E // Compile time expansion
171 , typename > // Restricting condition
172struct ExpandTraitEval2
173{};
175//*************************************************************************************************
176
177} // namespace blaze
178
179#endif
Numerical infinity for built-in data types.
typename ExpandTrait< T, CEAs... >::Type ExpandTrait_t
Auxiliary alias declaration for the ExpandTrait type trait.
Definition: ExpandTrait.h:145
Base template for the ExpandTrait class.
Definition: ExpandTrait.h:126
Header file for basic type definitions.