Blaze 3.9
IsLong.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_TYPETRAITS_ISLONG_H_
36#define _BLAZE_UTIL_TYPETRAITS_ISLONG_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44
45
46namespace blaze {
47
48//=================================================================================================
49//
50// CLASS DEFINITION
51//
52//=================================================================================================
53
54//*************************************************************************************************
74template< typename T >
75struct IsLong
76 : public FalseType
77{};
78//*************************************************************************************************
79
80
81//*************************************************************************************************
83
84template<>
85struct IsLong<long>
86 : public TrueType
87{};
89//*************************************************************************************************
90
91
92//*************************************************************************************************
94
95template<>
96struct IsLong<const long>
97 : public TrueType
98{};
100//*************************************************************************************************
101
102
103//*************************************************************************************************
105
106template<>
107struct IsLong<volatile long>
108 : public TrueType
109{};
111//*************************************************************************************************
112
113
114//*************************************************************************************************
116
117template<>
118struct IsLong<const volatile long>
119 : public TrueType
120{};
122//*************************************************************************************************
123
124
125//*************************************************************************************************
127
128template<>
129struct IsLong<unsigned long>
130 : public TrueType
131{};
133//*************************************************************************************************
134
135
136//*************************************************************************************************
138
139template<>
140struct IsLong<const unsigned long>
141 : public TrueType
142{};
144//*************************************************************************************************
145
146
147//*************************************************************************************************
149
150template<>
151struct IsLong<volatile unsigned long>
152 : public TrueType
153{};
155//*************************************************************************************************
156
157
158//*************************************************************************************************
160
161template<>
162struct IsLong<const volatile unsigned long>
163 : public TrueType
164{};
166//*************************************************************************************************
167
168
169//*************************************************************************************************
182template< typename T >
183constexpr bool IsLong_v = IsLong<T>::value;
184//*************************************************************************************************
185
186} // namespace blaze
187
188#endif
Header file for the IntegralConstant class template.
constexpr bool IsLong_v
Auxiliary variable template for the IsLong type trait.
Definition: IsLong.h:183
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for long integer types.
Definition: IsLong.h:77