Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::TypeTraits Namespace Reference

Template meta-programming helpers. More...

Classes

struct  AddPointer
 AddPointer adds a pointer qualification to a type T if it is not already a pointer. More...
 
struct  AddReference
 AddReference adds a reference qualifier to a type T if it is not already a reference. More...
 
struct  AddReference< T & >
 
struct  AddReference< T && >
 
struct  Conditional
 Conditional defines a type to be T if a boolean value is true, F otherwise. More...
 
struct  Conditional< false, T, F >
 
struct  EnableIf
 EnableIf conditionally defines a type if a boolean template parameter is true. More...
 
struct  EnableIf< true, T >
 
struct  IsConst
 IsConst evaluates to true if the provided type T is const, false otherwise. More...
 
struct  IsConst< const T >
 
struct  IsLValueReference
 Determines if a type is an lvalue reference. More...
 
struct  IsLValueReference< T & >
 
struct  IsReference
 IsReference evaluates to true if the type T is a reference, false otherwise. More...
 
struct  IsRValueReference
 Determines if a type is an rvalue reference. More...
 
struct  IsRValueReference< T && >
 
struct  IsSame
 IsSame evaluates to true if the provided types T and U are the same, false otherwise. More...
 
struct  IsSame< T, T >
 
struct  IsTriviallyCopyable
 IsTriviallyCopyable evaluates to true if the type T can be trivially copied, false otherwise. More...
 
struct  RemoveConst
 RemoveConst removes the const qualification from a type T. More...
 
struct  RemoveConst< const T >
 
struct  RemovePointer
 RemovePointer removes the pointer qualification from a type T. More...
 
struct  RemovePointer< T * >
 
struct  RemovePointer< T ** >
 
struct  RemoveReference
 Removes reference from a type T. More...
 
struct  RemoveReference< T & >
 
struct  RemoveReference< T && >
 
struct  ReturnType
 ReturnType extracts the return type from different forms of function types. More...
 
struct  ReturnType< R(*)(Args...)>
 
struct  ReturnType< R(Args...)>
 
struct  ReturnType< R(C::*)(Args...)>
 
struct  SameConstnessAs
 SameConstnessAs modifies type T to have the const-qualification of U. More...
 
struct  TypeList
 Represents a variadic template type list. More...
 
struct  TypeListGet
 Retrieves the type at the specified index in the TypeList. More...
 
struct  TypeListGet< TypeList< T, TT... >, N, M >
 Specialization of TypeListGet that retrieves the type at the given index.
 
struct  TypeListGet< TypeList<>, N, 0 >
 Empty TypeListGet specialization with an index.
 
struct  TypeListGet< TypeList<>, N, M >
 Specialization of TypeListGet for an empty TypeList.
 

Typedefs

template<typename T , int N>
using TypeListGetT = typename TypeListGet< T, N >::type
 Alias template to simplify accessing the retrieved type using TypeListGet. More...
 
template<bool B, class T , class F >
using ConditionalT = typename Conditional< B, T, F >::type
 ConditionalT is an alias template that resolves to type T if a boolean value is true, otherwise to type F. More...
 

Functions

template<typename T , size_t N>
constexpr auto SizeOfArray (const T(&)[N])
 SizeOfArray is a constexpr function that returns the compile-time size N of a plain C array. More...
 

Detailed Description

Template meta-programming helpers.