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 : public BoolConstant< IsBuiltin<T>::value && !IsBoolean<T>::value && !IsVoid<T>::value >
80 {};
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
86 template< typename T >
88 struct IsNumeric< complex<T> > : public IsNumeric<T>::Type
89 {};
91 //*************************************************************************************************
92 
93 
94 //*************************************************************************************************
96 template< typename T >
98 struct IsNumeric< const complex<T> > : public IsNumeric<T>::Type
99 {};
101 //*************************************************************************************************
102 
103 
104 //*************************************************************************************************
106 template< typename T >
108 struct IsNumeric< volatile complex<T> > : public IsNumeric<T>::Type
109 {};
111 //*************************************************************************************************
112 
113 
114 //*************************************************************************************************
116 template< typename T >
118 struct IsNumeric< const volatile complex<T> > : public IsNumeric<T>::Type
119 {};
121 //*************************************************************************************************
122 
123 } // namespace blaze
124 
125 #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:57
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.