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>
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< IsBuiltin<T>::value && !IsBoolean<T>::value && !IsVoid<T>::value >
81 {};
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
87 template< typename T >
89 struct IsNumeric< complex<T> >
90  : public IsNumeric<T>::Type
91 {};
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
98 template< typename T >
100 struct IsNumeric< const complex<T> >
101  : public IsNumeric<T>::Type
102 {};
104 //*************************************************************************************************
105 
106 
107 //*************************************************************************************************
109 template< typename T >
111 struct IsNumeric< volatile complex<T> >
112  : public IsNumeric<T>::Type
113 {};
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
120 template< typename T >
122 struct IsNumeric< const volatile complex<T> >
123  : public IsNumeric<T>::Type
124 {};
126 //*************************************************************************************************
127 
128 } // namespace blaze
129 
130 #endif
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the IsVoid type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IsBoolean type trait.
Header file for the IsBuiltin type trait.
Header file for the IntegralConstant class template.
Header file for the complex data type.