Blaze  3.6
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 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
74 template< typename T >
75 struct IsShort
76  : public FalseType
77 {};
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
83 template<>
85 struct IsShort<short>
86  : public TrueType
87 {};
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
94 template<>
96 struct IsShort<const short>
97  : public TrueType
98 {};
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
105 template<>
107 struct IsShort<volatile short>
108  : public TrueType
109 {};
111 //*************************************************************************************************
112 
113 
114 //*************************************************************************************************
116 template<>
118 struct IsShort<const volatile short>
119  : public TrueType
120 {};
122 //*************************************************************************************************
123 
124 
125 //*************************************************************************************************
127 template<>
129 struct IsShort<unsigned short>
130  : public TrueType
131 {};
133 //*************************************************************************************************
134 
135 
136 //*************************************************************************************************
138 template<>
140 struct IsShort<const unsigned short>
141  : public TrueType
142 {};
144 //*************************************************************************************************
145 
146 
147 //*************************************************************************************************
149 template<>
151 struct IsShort<volatile unsigned short>
152  : public TrueType
153 {};
155 //*************************************************************************************************
156 
157 
158 //*************************************************************************************************
160 template<>
162 struct IsShort<const volatile unsigned short>
163  : public TrueType
164 {};
166 //*************************************************************************************************
167 
168 
169 //*************************************************************************************************
182 template< typename T >
183 constexpr bool IsShort_v = IsShort<T>::value;
184 //*************************************************************************************************
185 
186 } // namespace blaze
187 
188 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Compile time check for short integer types.This type trait tests whether or not the given template pa...
Definition: IsShort.h:75
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:183
Header file for the IntegralConstant class template.