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
77  : public FalseType
78 {};
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
84 template<>
86 struct IsShort<short>
87  : public TrueType
88 {};
90 //*************************************************************************************************
91 
92 
93 //*************************************************************************************************
95 template<>
97 struct IsShort<const short>
98  : public TrueType
99 {};
101 //*************************************************************************************************
102 
103 
104 //*************************************************************************************************
106 template<>
108 struct IsShort<volatile short>
109  : public TrueType
110 {};
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
117 template<>
119 struct IsShort<const volatile short>
120  : public TrueType
121 {};
123 //*************************************************************************************************
124 
125 
126 //*************************************************************************************************
128 template<>
130 struct IsShort<unsigned short>
131  : public TrueType
132 {};
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
139 template<>
141 struct IsShort<const unsigned short>
142  : public TrueType
143 {};
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
150 template<>
152 struct IsShort<volatile unsigned short>
153  : public TrueType
154 {};
156 //*************************************************************************************************
157 
158 
159 //*************************************************************************************************
161 template<>
163 struct IsShort<const volatile unsigned short>
164  : public TrueType
165 {};
167 //*************************************************************************************************
168 
169 
170 //*************************************************************************************************
183 template< typename T >
184 constexpr bool IsShort_v = IsShort<T>::value;
185 //*************************************************************************************************
186 
187 } // namespace blaze
188 
189 #endif
Header file for the FalseType type/value trait base class.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Compile time check for short integer types.This type trait tests whether or not the given template pa...
Definition: IsShort.h:76
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsShort_v
Auxiliary variable template for the IsShort type trait.The IsShort_v variable template provides a con...
Definition: IsShort.h:184
Header file for the TrueType type/value trait base class.