All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsInteger.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISINTEGER_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISINTEGER_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/util/FalseType.h>
31 #include <blaze/util/TrueType.h>
32 
33 
34 namespace blaze {
35 
36 //=================================================================================================
37 //
38 // CLASS DEFINITION
39 //
40 //=================================================================================================
41 
42 //*************************************************************************************************
66 template< typename T >
67 struct IsInteger : public FalseType
68 {
69  public:
70  //**********************************************************************************************
72  enum { value = 0 };
73  typedef FalseType Type;
75  //**********************************************************************************************
76 };
77 //*************************************************************************************************
78 
79 
80 //*************************************************************************************************
82 
83 template<>
84 struct IsInteger<int> : public TrueType
85 {
86  public:
87  //**********************************************************************************************
88  enum { value = 1 };
89  typedef TrueType Type;
90  //**********************************************************************************************
91 };
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
98 
99 template<>
100 struct IsInteger<const int> : public TrueType
101 {
102  public:
103  //**********************************************************************************************
104  enum { value = 1 };
105  typedef TrueType Type;
106  //**********************************************************************************************
107 };
109 //*************************************************************************************************
110 
111 
112 //*************************************************************************************************
114 
115 template<>
116 struct IsInteger<volatile int> : public TrueType
117 {
118  public:
119  //**********************************************************************************************
120  enum { value = 1 };
121  typedef TrueType Type;
122  //**********************************************************************************************
123 };
125 //*************************************************************************************************
126 
127 
128 //*************************************************************************************************
130 
131 template<>
132 struct IsInteger<const volatile int> : public TrueType
133 {
134  public:
135  //**********************************************************************************************
136  enum { value = 1 };
137  typedef TrueType Type;
138  //**********************************************************************************************
139 };
141 //*************************************************************************************************
142 
143 
144 //*************************************************************************************************
146 
147 template<>
148 struct IsInteger<unsigned int> : public TrueType
149 {
150  public:
151  //**********************************************************************************************
152  enum { value = 1 };
153  typedef TrueType Type;
154  //**********************************************************************************************
155 };
157 //*************************************************************************************************
158 
159 
160 //*************************************************************************************************
162 
163 template<>
164 struct IsInteger<const unsigned int> : public TrueType
165 {
166  public:
167  //**********************************************************************************************
168  enum { value = 1 };
169  typedef TrueType Type;
170  //**********************************************************************************************
171 };
173 //*************************************************************************************************
174 
175 
176 //*************************************************************************************************
178 
179 template<>
180 struct IsInteger<volatile unsigned int> : public TrueType
181 {
182  public:
183  //**********************************************************************************************
184  enum { value = 1 };
185  typedef TrueType Type;
186  //**********************************************************************************************
187 };
189 //*************************************************************************************************
190 
191 
192 //*************************************************************************************************
194 
195 template<>
196 struct IsInteger<const volatile unsigned int> : public TrueType
197 {
198  public:
199  //**********************************************************************************************
200  enum { value = 1 };
201  typedef TrueType Type;
202  //**********************************************************************************************
203 };
205 //*************************************************************************************************
206 
207 } // namespace blaze
208 
209 #endif