4#include "../Foundation/PrimitiveTypes.h"
25template <
bool B,
class T =
void>
struct EnableIf {};
26template <
class T>
struct EnableIf<true, T> {
using type = T; };
29template <
typename T,
typename U>
struct IsSame {
static constexpr bool value =
false; };
30template <
typename T>
struct IsSame<T, T> {
static constexpr bool value =
true; };
33template <
class T>
struct AddPointer {
using type =
typename RemoveReference<T>::type*; };
37template <
class T>
struct RemoveConst<const T> {
using type = T; };
40template <
typename T>
struct IsConst {
using type = T;
static constexpr bool value =
false; };
41template <
typename T>
struct IsConst<const T> {
using type = T;
static constexpr bool value =
true; };
44template <
typename T>
struct IsTriviallyCopyable {
static constexpr bool value = __is_trivially_copyable(T); };
47template <
bool B,
class T,
class F>
struct Conditional {
using type = T; };
48template <
class T,
class F>
struct Conditional<false, T, F> {
using type = F; };
AddPointer adds a pointer qualification to a type T if it is not already a pointer.
Definition TypeTraits.h:33
Conditional defines a type to be T if a boolean value is true, F otherwise.
Definition TypeTraits.h:47
EnableIf conditionally defines a type if a boolean template parameter is true.
Definition TypeTraits.h:25
IsConst evaluates to true if the provided type T is const, false otherwise.
Definition TypeTraits.h:40
IsSame evaluates to true if the provided types T and U are the same, false otherwise.
Definition TypeTraits.h:29
IsTriviallyCopyable evaluates to true if the type T can be trivially copied, false otherwise.
Definition TypeTraits.h:44
RemoveConst removes the const qualification from a type T.
Definition TypeTraits.h:36
SameConstnessAs modifies type T to have the const-qualification of U.
Definition TypeTraits.h:51