24 #ifndef util_NumericEnum_hpp
25 #define util_NumericEnum_hpp
28 #include <util/Basics.hpp>
29 #include <util/TypeList.hpp>
56 #ifndef DOXYGEN_COMPILE
58 typedef TypeList< void ,
59 TypeList<
signed char ,
60 TypeList<
unsigned char ,
61 TypeList<
signed short ,
62 TypeList<
unsigned short ,
63 TypeList<
signed int ,
64 TypeList<
unsigned int ,
65 TypeList<
signed long ,
66 TypeList<
unsigned long ,
69 TypeList< std::complex<float> ,
70 TypeList< std::complex<double> ,
73 TypeList<
signed char * ,
74 TypeList<
unsigned char * ,
75 TypeList<
signed short * ,
76 TypeList<
unsigned short * ,
77 TypeList<
signed int * ,
78 TypeList<
unsigned int * ,
79 TypeList<
signed long * ,
80 TypeList<
unsigned long * ,
83 TypeList< std::complex<float> * ,
84 TypeList< std::complex<double> * ,
86 TypeListEnd > > > > > > > > > > > > >
87 > > > > > > > > > > > > > NumericTypeList ;
100 enum { minimum = 1 };
101 enum { maximum = length - 1 };
104 static const char * name(
unsigned ordinal );
107 static unsigned size(
unsigned ordinal );
117 template<
typename Type>
124 #ifndef DOXYGEN_COMPILE
130 enum { OK = StaticAssert<
132 ((int) value < (
int) NumericEnum<void>::length) >::OK };
136 template<
unsigned Ordinal>
138 #ifndef DOXYGEN_COMPILE
Member enum { value = ... }; is the location within ListType of occurance I of type TestValue ...
Compiler-enforced value of 'expression == true'.
Member typedef ... type ; is the type of the member of ListType at location ordinal if ordinal...
Map a numeric scalar Type to an integer value.
Inverse map of a numeric scalar type to an integer value.
Member enum { value = ... }; is the length of the type list.