All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsShort.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_ISSHORT_H_
36 #define _BLAZE_UTIL_TYPETRAITS_ISSHORT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/FalseType.h>
44 #include <blaze/util/TrueType.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
75 template< typename T >
76 struct IsShort : public FalseType
77 {
78  public:
79  //**********************************************************************************************
81  enum { value = 0 };
82  typedef FalseType Type;
84  //**********************************************************************************************
85 };
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
91 template<>
93 struct IsShort<short> : public TrueType
94 {
95  public:
96  //**********************************************************************************************
97  enum { value = 1 };
98  typedef TrueType Type;
99  //**********************************************************************************************
100 };
102 //*************************************************************************************************
103 
104 
105 //*************************************************************************************************
107 template<>
109 struct IsShort<const short> : public TrueType
110 {
111  public:
112  //**********************************************************************************************
113  enum { value = 1 };
114  typedef TrueType Type;
115  //**********************************************************************************************
116 };
118 //*************************************************************************************************
119 
120 
121 //*************************************************************************************************
123 template<>
125 struct IsShort<volatile short> : public TrueType
126 {
127  public:
128  //**********************************************************************************************
129  enum { value = 1 };
130  typedef TrueType Type;
131  //**********************************************************************************************
132 };
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
139 template<>
141 struct IsShort<const volatile short> : public TrueType
142 {
143  public:
144  //**********************************************************************************************
145  enum { value = 1 };
146  typedef TrueType Type;
147  //**********************************************************************************************
148 };
150 //*************************************************************************************************
151 
152 
153 //*************************************************************************************************
155 template<>
157 struct IsShort<unsigned short> : public TrueType
158 {
159  public:
160  //**********************************************************************************************
161  enum { value = 1 };
162  typedef TrueType Type;
163  //**********************************************************************************************
164 };
166 //*************************************************************************************************
167 
168 
169 //*************************************************************************************************
171 template<>
173 struct IsShort<const unsigned short> : public TrueType
174 {
175  public:
176  //**********************************************************************************************
177  enum { value = 1 };
178  typedef TrueType Type;
179  //**********************************************************************************************
180 };
182 //*************************************************************************************************
183 
184 
185 //*************************************************************************************************
187 template<>
189 struct IsShort<volatile unsigned short> : public TrueType
190 {
191  public:
192  //**********************************************************************************************
193  enum { value = 1 };
194  typedef TrueType Type;
195  //**********************************************************************************************
196 };
198 //*************************************************************************************************
199 
200 
201 //*************************************************************************************************
203 template<>
205 struct IsShort<const volatile unsigned short> : public TrueType
206 {
207  public:
208  //**********************************************************************************************
209  enum { value = 1 };
210  typedef TrueType Type;
211  //**********************************************************************************************
212 };
214 //*************************************************************************************************
215 
216 } // namespace blaze
217 
218 #endif
Header file for the FalseType type/value trait base class.
Compile time check for short integer types.This type trait tests whether or not the given template pa...
Definition: IsShort.h:76
boost::false_type FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the TrueType type/value trait base class.