All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsShort.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISSHORT_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISSHORT_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 //*************************************************************************************************
62 template< typename T >
63 struct IsShort : public FalseType
64 {
65  public:
66  //**********************************************************************************************
68  enum { value = 0 };
69  typedef FalseType Type;
71  //**********************************************************************************************
72 };
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
78 
79 template<>
80 struct IsShort<short> : public TrueType
81 {
82  public:
83  //**********************************************************************************************
84  enum { value = 1 };
85  typedef TrueType Type;
86  //**********************************************************************************************
87 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
94 
95 template<>
96 struct IsShort<const short> : public TrueType
97 {
98  public:
99  //**********************************************************************************************
100  enum { value = 1 };
101  typedef TrueType Type;
102  //**********************************************************************************************
103 };
105 //*************************************************************************************************
106 
107 
108 //*************************************************************************************************
110 
111 template<>
112 struct IsShort<volatile short> : public TrueType
113 {
114  public:
115  //**********************************************************************************************
116  enum { value = 1 };
117  typedef TrueType Type;
118  //**********************************************************************************************
119 };
121 //*************************************************************************************************
122 
123 
124 //*************************************************************************************************
126 
127 template<>
128 struct IsShort<const volatile short> : public TrueType
129 {
130  public:
131  //**********************************************************************************************
132  enum { value = 1 };
133  typedef TrueType Type;
134  //**********************************************************************************************
135 };
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
142 
143 template<>
144 struct IsShort<unsigned short> : public TrueType
145 {
146  public:
147  //**********************************************************************************************
148  enum { value = 1 };
149  typedef TrueType Type;
150  //**********************************************************************************************
151 };
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
158 
159 template<>
160 struct IsShort<const unsigned short> : public TrueType
161 {
162  public:
163  //**********************************************************************************************
164  enum { value = 1 };
165  typedef TrueType Type;
166  //**********************************************************************************************
167 };
169 //*************************************************************************************************
170 
171 
172 //*************************************************************************************************
174 
175 template<>
176 struct IsShort<volatile unsigned short> : public TrueType
177 {
178  public:
179  //**********************************************************************************************
180  enum { value = 1 };
181  typedef TrueType Type;
182  //**********************************************************************************************
183 };
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
190 
191 template<>
192 struct IsShort<const volatile unsigned short> : public TrueType
193 {
194  public:
195  //**********************************************************************************************
196  enum { value = 1 };
197  typedef TrueType Type;
198  //**********************************************************************************************
199 };
201 //*************************************************************************************************
202 
203 } // namespace blaze
204 
205 #endif