29 #ifndef Pt_TypeTraits_h
30 #define Pt_TypeTraits_h
52 static const unsigned int isConst = 0;
59 struct TypeTraits<const T> :
public TypeTraitsBase<T>
61 static const unsigned int isConst = 1;
68 struct TypeTraits<T&> :
public TypeTraitsBase<T>
70 static const unsigned int isConst = 0;
71 static const unsigned int isPointer = 0;
72 static const unsigned int isReference = 1;
77 struct TypeTraits<const T&> :
public TypeTraitsBase<T>
79 static const unsigned int isConst = 1;
80 static const unsigned int isPointer = 0;
81 static const unsigned int isReference = 1;
86 struct TypeTraits<T*> :
public TypeTraitsBase<T>
88 static const unsigned int isConst = 0;
89 static const unsigned int isPointer = 1;
90 static const unsigned int isReference = 0;
95 struct TypeTraits<const T*> :
public TypeTraitsBase<T>
97 static const unsigned int isConst = 1;
98 static const unsigned int isPointer = 1;
99 static const unsigned int isReference = 0;
103 template <
typename T, std::
size_t N>
104 struct TypeTraits<T[N]> :
public TypeTraitsBase<T>
106 static const unsigned int isConst = 0;
113 struct TypeTraits<void>
116 typedef void ConstType;
122 static const unsigned int isConst = 0;
128 template <
typename T>
133 struct IntTraits<signed char>
135 typedef unsigned char Unsigned;
136 typedef signed char Signed;
138 static const unsigned int isSigned = 1;
142 struct IntTraits<unsigned char>
144 typedef unsigned char Unsigned;
145 typedef signed char Signed;
147 static const unsigned int isSigned = 0;
151 struct IntTraits<short>
153 typedef unsigned short Unsigned;
154 typedef signed short Signed;
156 static const unsigned int isSigned = 1;
160 struct IntTraits<unsigned short>
162 typedef unsigned short Unsigned;
163 typedef signed short Signed;
165 static const unsigned int isSigned = 0;
169 struct IntTraits<int>
171 typedef unsigned int Unsigned;
172 typedef signed int Signed;
174 static const unsigned int isSigned = 1;
178 struct IntTraits<unsigned int>
180 typedef unsigned int Unsigned;
181 typedef signed int Signed;
183 static const unsigned int isSigned = 0;
187 struct IntTraits<long>
189 typedef unsigned long Unsigned;
190 typedef signed long Signed;
192 static const unsigned int isSigned = 1;
196 struct IntTraits<unsigned long>
198 typedef unsigned long Unsigned;
199 typedef signed long Signed;
201 static const unsigned int isSigned = 0;
205 struct IntTraits<long long>
207 typedef unsigned long long Unsigned;
208 typedef signed long long Signed;
210 static const unsigned int isSigned = 1;
214 struct IntTraits<unsigned long long>
216 typedef unsigned long long Unsigned;
217 typedef signed long long Signed;
219 static const unsigned int isSigned = 0;
224 #endif // Pt_TypeTraits_h
IMPLEMENTATION_DEFINED ConstReference
The derived const qualified reference type.
Definition: TypeTraits.h:30
IMPLEMENTATION_DEFINED ConstValue
The derived const qualified value type.
Definition: TypeTraits.h:24
static const unsigned int isReference
If the type is a reference 1, otherwise 0.
Definition: TypeTraits.h:45
Traits for type properties.
Definition: TypeTraits.h:18
IMPLEMENTATION_DEFINED Pointer
The derived pointer type.
Definition: TypeTraits.h:33
IMPLEMENTATION_DEFINED Reference
The derived reference type.
Definition: TypeTraits.h:27
static const unsigned int isPointer
If the type is a pointer 1, otherwise 0.
Definition: TypeTraits.h:42
static const unsigned int isConst
If the type is const 1, otherwise 0.
Definition: TypeTraits.h:39
IMPLEMENTATION_DEFINED Value
The derived value type.
Definition: TypeTraits.h:21
IMPLEMENTATION_DEFINED ConstPointer
The derived const qualified reference type.
Definition: TypeTraits.h:36