#include <Pt/TypeTraits.h>
Traits for type properties. More...
Public Types | |
typedef IMPLEMENTATION_DEFINED | ConstPointer |
The derived const qualified reference type. | |
typedef IMPLEMENTATION_DEFINED | ConstReference |
The derived const qualified reference type. | |
typedef IMPLEMENTATION_DEFINED | ConstValue |
The derived const qualified value type. | |
typedef IMPLEMENTATION_DEFINED | Pointer |
The derived pointer type. | |
typedef IMPLEMENTATION_DEFINED | Reference |
The derived reference type. | |
typedef IMPLEMENTATION_DEFINED | Value |
The derived value type. | |
Static Public Attributes | |
static const unsigned int | isConst |
If the type is const 1, otherwise 0. | |
static const unsigned int | isPointer |
If the type is a pointer 1, otherwise 0. | |
static const unsigned int | isReference |
If the type is a reference 1, otherwise 0. | |
The TypeTraits can determine at compile time whether a type is const, is a reference or is a pointer. This is useful for template programming, where code can branch differently depending on the type traits.