HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_TypeDecorate.h File Reference
+ 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  LegacyTrivialRelocationNoCV< T >
 
struct  RegisterTrivialRelocationNoCV< 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_LEGACY_TR_IMPL(...)
 
#define SYS_REGISTER_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...
 
#define SYS_DECLARE_LEGACY_TR(T)   template<> SYS_DECLARE_LEGACY_TR_IMPL(T)
 
#define SYS_DECLARE_LEGACY_TR_TEMPLATE(...)   SYS_DECLARE_LEGACY_TR_IMPL( __VA_ARGS__ )
 Version for class template. More...
 
#define SYS_REGISTER_TR(T)   template<> SYS_REGISTER_TR_IMPL(T)
 
#define SYS_REGISTER_TR_TEMPLATE(...)   SYS_REGISTER_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" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Declare a type as floating point.

Definition at line 106 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" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Declare a type as integral.

Definition at line 97 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 162 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" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Definition at line 131 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 165 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" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Declare a type as POD.

Definition at line 115 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 156 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" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Definition at line 123 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 159 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_LEGACY_TR (   T)    template<> SYS_DECLARE_LEGACY_TR_IMPL(T)

Declare that trivial relocation must be used with T, but only because T is legacy code Ideally, the type T would be modified to allow safe relocation, by providing a move constructor.

Definition at line 171 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_LEGACY_TR_IMPL (   ...)
Value:
struct LegacyTrivialRelocationNoCV< __VA_ARGS__ > { \
static_assert( ( ! SYS_HasCV_v< __VA_ARGS__ > ), \
"SYS_DECLARE_LEGACY_TR must be used on types without const/volatile qualifiers" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Definition at line 139 of file SYS_TypeDecorate.h.

#define SYS_DECLARE_LEGACY_TR_TEMPLATE (   ...)    SYS_DECLARE_LEGACY_TR_IMPL( __VA_ARGS__ )

Version for class template.

Definition at line 174 of file SYS_TypeDecorate.h.

#define SYS_REGISTER_TR (   T)    template<> SYS_REGISTER_TR_IMPL(T)

Register that trivial relocation is currently being used with T This does not declare that this is safe at all; it just documents each type that is currently being trivially relocated. the information is merely used to help compile a list of all types that are currently being trivially relocated by UT_Array (all types were being trivially relocated before H20). An actual decision on whether TR should be remain enabled for the type T can be made later.

Definition at line 184 of file SYS_TypeDecorate.h.

#define SYS_REGISTER_TR_IMPL (   ...)
Value:
struct RegisterTrivialRelocationNoCV< __VA_ARGS__ > { \
static_assert( ( ! SYS_HasCV_v< __VA_ARGS__ > ), \
"SYS_REGISTER_TR must be used on types without const/volatile qualifiers" ); \
[[maybe_unused]] static constexpr bool value = true; \
};\
Definition: core.h:1131

Definition at line 147 of file SYS_TypeDecorate.h.

#define SYS_REGISTER_TR_TEMPLATE (   ...)    SYS_REGISTER_TR_IMPL( __VA_ARGS__ )

Version for class template.

Definition at line 187 of file SYS_TypeDecorate.h.

Typedef Documentation

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

Definition at line 36 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 86 of file SYS_TypeDecorate.h.