Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typetraits
IsNumeric.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_TYPETRAITS_ISNUMERIC_H_
36
#define _BLAZE_UTIL_TYPETRAITS_ISNUMERIC_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/util/Complex.h
>
44
#include <
blaze/util/IntegralConstant.h
>
45
#include <
blaze/util/typetraits/IsArithmetic.h
>
46
#include <
blaze/util/typetraits/IsBoolean.h
>
47
#include <
blaze/util/typetraits/IsComplex.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// CLASS DEFINITION
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
78
template
<
typename
T >
79
struct
IsNumeric
80
:
public
BoolConstant
< ( IsArithmetic_v<T> && !IsBoolean_v<T> ) || IsComplex_v<T> >
81
{};
82
//*************************************************************************************************
83
84
85
//*************************************************************************************************
88
template
<
typename
T >
89
struct
IsNumeric
< const T >
90
:
public
IsNumeric
<T>
::Type
91
{};
93
//*************************************************************************************************
94
95
96
//*************************************************************************************************
99
template
<
typename
T >
100
struct
IsNumeric< volatile T >
101
:
public
IsNumeric<T>::Type
102
{};
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
110
template
<
typename
T >
111
struct
IsNumeric
< const volatile T >
112
:
public
IsNumeric
<T>::Type
113
{};
115
//*************************************************************************************************
116
117
118
//*************************************************************************************************
131
template
<
typename
T >
132
constexpr
bool
IsNumeric_v
=
IsNumeric<T>::value
;
133
//*************************************************************************************************
134
135
}
// namespace blaze
136
137
#endif
Complex.h
Header file for the complex data type.
IntegralConstant.h
Header file for the IntegralConstant class template.
IsArithmetic.h
Header file for the IsArithmetic type trait.
IsBoolean.h
Header file for the IsBoolean type trait.
IsComplex.h
Header file for the IsComplex type trait.
blaze::Type
blaze::IsNumeric_v
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.
Definition
IsNumeric.h:132
blaze::BoolConstant
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition
IntegralConstant.h:110
blaze::IsNumeric
Compile time check for numeric types.
Definition
IsNumeric.h:81
Generated by
1.18.0