HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_TypeDecorate.h File Reference
#include "SYS_Compiler.h"
+ Include dependency graph for SYS_TypeDecorate.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SYS_RemoveCV< T >
 
struct  SYS_RemoveCV< const T >
 
struct  SYS_RemoveCV< volatile T >
 
struct  SYS_RemoveCV< const volatile T >
 
struct  AddIntegralNoCV< T >
 
struct  AddFloatingPointNoCV< T >
 
struct  AddPodNoCV< T >
 
struct  SafeTrivialRelocationNoCV< T >
 
struct  UnsafeTrivialRelocationNoCV< T >
 
struct  SYS_IsFixedArrayNoCVRef< T >
 
struct  SYS_FixedArrayElementNoCVRef< T >
 
struct  SYS_FixedArraySizeNoCVRef< T >
 
struct  SYS_HasCV< T >
 
struct  SYS_HasCV< const T >
 
struct  SYS_HasCV< volatile T >
 
struct  SYS_HasCV< const volatile T >
 
struct  SafeTrivialRelocationNoCV< T * >
 

Macros

#define SYS_DECLARE_IS_INTEGRAL(T)
 Declare a type as integral. More...
 
#define SYS_DECLARE_IS_FLOATING_POINT(T)
 Declare a type as floating point. More...
 
#define SYS_DECLARE_IS_POD(T)
 Declare a type as POD. More...
 
#define SYS_DECLARE_IS_TR_IMPL(...)
 
#define SYS_DECLARE_IS_NOT_TR_IMPL(...)
 
#define SYS_DECLARE_IS_TR(T)   template<> SYS_DECLARE_IS_TR_IMPL(T)
 Guarantee that it's safe to use trivial relocation with type T. More...
 
#define SYS_DECLARE_IS_TR_TEMPLATE(...)   SYS_DECLARE_IS_TR_IMPL( __VA_ARGS__ )
 Version for class template. More...
 
#define SYS_DECLARE_IS_NOT_TR(T)   template<> SYS_DECLARE_IS_NOT_TR_IMPL(T)
 Declare that that trivial relocation with type T is not guaranteed to be safe. More...
 
#define SYS_DECLARE_IS_NOT_TR_TEMPLATE(...)   SYS_DECLARE_IS_NOT_TR_IMPL( __VA_ARGS__ )
 Version for class template. More...
 

Typedefs

template<typename T >
using SYS_RemoveCV_t = typename SYS_RemoveCV< T >::type
 

Functions

 SYS_DECLARE_IS_TR (bool)
 
 SYS_DECLARE_IS_TR (char)
 
 SYS_DECLARE_IS_TR (unsigned char)
 
 SYS_DECLARE_IS_TR (unsigned short int)
 
 SYS_DECLARE_IS_TR (unsigned long int)
 
 SYS_DECLARE_IS_TR (unsigned long long int)
 
 SYS_DECLARE_IS_TR (signed char)
 
 SYS_DECLARE_IS_TR (signed short int)
 
 SYS_DECLARE_IS_TR (signed long int)
 
 SYS_DECLARE_IS_TR (signed long long int)
 
 SYS_DECLARE_IS_TR (float)
 
 SYS_DECLARE_IS_TR (double)
 

Variables

template<typename T >
constexpr auto SYS_HasCV_v = SYS_HasCV< T >::value
 

Detailed Description

Provides facilities to decorate types that can then be tested using type traits.

Definition in file SYS_TypeDecorate.h.

Macro Definition Documentation

#define SYS_DECLARE_IS_FLOATING_POINT (   T)
Value:
template<> struct AddFloatingPointNoCV< T > { \
static_assert( ( ! SYS_HasCV_v< T > ), \
"SYS_DECLARE_IS_FLOATING_POINT must be used on types without const/volatile qualifiers" ); \
SYS_MAYBE_UNUSED static constexpr bool value = true; \
};\
#define SYS_MAYBE_UNUSED
Definition: SYS_Compiler.h:71
Definition: core.h:1131

Declare a type as floating point.

Definition at line 88 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_INTEGRAL (   T)
Value:
template<> struct AddIntegralNoCV< T > { \
static_assert( ( ! SYS_HasCV_v< T > ), \
"SYS_DECLARE_IS_INTEGRAL must be used on types without const/volatile qualifiers" ); \
SYS_MAYBE_UNUSED static constexpr bool value = true; \
};\
#define SYS_MAYBE_UNUSED
Definition: SYS_Compiler.h:71
Definition: core.h:1131

Declare a type as integral.

Definition at line 79 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_NOT_TR (   T)    template<> SYS_DECLARE_IS_NOT_TR_IMPL(T)

Declare that that trivial relocation with type T is not guaranteed to be safe.

Definition at line 128 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_NOT_TR_IMPL (   ...)
Value:
struct UnsafeTrivialRelocationNoCV< __VA_ARGS__ > { \
static_assert( ( ! SYS_HasCV_v< __VA_ARGS__ > ), \
"SYS_DECLARE_IS_NOT_TR must be used on types without const/volatile qualifiers" ); \
SYS_MAYBE_UNUSED static constexpr bool value = true; \
};\
#define SYS_MAYBE_UNUSED
Definition: SYS_Compiler.h:71
Definition: core.h:1131

Definition at line 113 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_NOT_TR_TEMPLATE (   ...)    SYS_DECLARE_IS_NOT_TR_IMPL( __VA_ARGS__ )

Version for class template.

Definition at line 131 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_POD (   T)
Value:
template<> struct AddPodNoCV< T > { \
static_assert( ( ! SYS_HasCV_v< T > ), \
"SYS_DECLARE_IS_POD must be used on types without const/volatile qualifiers" ); \
SYS_MAYBE_UNUSED static constexpr bool value = true; \
};\
#define SYS_MAYBE_UNUSED
Definition: SYS_Compiler.h:71
Definition: core.h:1131

Declare a type as POD.

Definition at line 97 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_TR (   T)    template<> SYS_DECLARE_IS_TR_IMPL(T)

Guarantee that it's safe to use trivial relocation with type T.

Definition at line 122 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_TR_IMPL (   ...)
Value:
struct SafeTrivialRelocationNoCV< __VA_ARGS__ > { \
static_assert( ( ! SYS_HasCV_v< __VA_ARGS__> ), \
"SYS_DECLARE_IS_TR must be used on types without const/volatile qualifiers" ); \
SYS_MAYBE_UNUSED static constexpr bool value = true; \
};\
#define SYS_MAYBE_UNUSED
Definition: SYS_Compiler.h:71
Definition: core.h:1131

Definition at line 105 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_IS_TR_TEMPLATE (   ...)    SYS_DECLARE_IS_TR_IMPL( __VA_ARGS__ )

Version for class template.

Definition at line 125 of file SYS_TypeDecorate.h.

Typedef Documentation

template<typename T >
using SYS_RemoveCV_t = typename SYS_RemoveCV< T >::type

Definition at line 38 of file SYS_TypeDecorate.h.

Function Documentation

SYS_DECLARE_IS_TR ( bool  )
SYS_DECLARE_IS_TR ( char  )
SYS_DECLARE_IS_TR ( unsigned  char)
SYS_DECLARE_IS_TR ( unsigned short  int)
SYS_DECLARE_IS_TR ( unsigned long  int)
SYS_DECLARE_IS_TR ( unsigned long long  int)
SYS_DECLARE_IS_TR ( signed  char)
SYS_DECLARE_IS_TR ( signed short  int)
SYS_DECLARE_IS_TR ( signed long  int)
SYS_DECLARE_IS_TR ( signed long long  int)
SYS_DECLARE_IS_TR ( float  )
SYS_DECLARE_IS_TR ( double  )

Variable Documentation

template<typename T >
constexpr auto SYS_HasCV_v = SYS_HasCV< T >::value

Definition at line 68 of file SYS_TypeDecorate.h.