C++ Utilities
4.14.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Contains traits for conveniently exploiting SFINAE. More...
Classes | |
struct | All |
struct | All< Head, Tail... > |
struct | Any |
struct | Any< Head, Tail... > |
struct | Bool |
struct | IsComplete |
struct | IsComplete< T, decltype(void(sizeof(T)))> |
struct | IsCString |
struct | IsSpecializationOf |
struct | IsSpecializationOf< Template< Args... >, Template > |
struct | IsString |
Typedefs | |
template<typename If , typename Then , typename Else > | |
using | Conditional = typename std::conditional< If::value, Then, Else >::type |
template<typename T > | |
using | Not = Bool<!T::value > |
template<typename... Condition> | |
using | EnableIf = typename std::enable_if< All< Condition... >::value, Detail::Enabler >::type |
template<typename... Condition> | |
using | DisableIf = typename std::enable_if<!All< Condition... >::value, Detail::Enabler >::type |
template<typename... Condition> | |
using | EnableIfAny = typename std::enable_if< Any< Condition... >::value, Detail::Enabler >::type |
template<typename... Condition> | |
using | DisableIfAny = typename std::enable_if<!Any< Condition... >::value, Detail::Enabler >::type |
Functions | |
CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK (HasSize, std::is_integral< decltype(std::declval< T &>().size())>::value) | |
CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK (IsReservable, std::declval< T &>().reserve(0u)) | |
CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK (IsIteratable, std::begin(std::declval< T &>()) !=std::end(std::declval< T &>()) CPP_UTILITIES_PP_COMMA void() CPP_UTILITIES_PP_COMMA++std::declval< decltype(begin(std::declval< T &>())) &>() CPP_UTILITIES_PP_COMMA void(*begin(std::declval< T &>()))) | |
Contains traits for conveniently exploiting SFINAE.
using Traits::Conditional = typedef typename std::conditional<If::value, Then, Else>::type |
using Traits::DisableIf = typedef typename std::enable_if<!All<Condition...>::value, Detail::Enabler>::type |
using Traits::DisableIfAny = typedef typename std::enable_if<!Any<Condition...>::value, Detail::Enabler>::type |
using Traits::EnableIf = typedef typename std::enable_if<All<Condition...>::value, Detail::Enabler>::type |
using Traits::EnableIfAny = typedef typename std::enable_if<Any<Condition...>::value, Detail::Enabler>::type |
using Traits::Not = typedef Bool<!T::value> |
Traits::CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK | ( | HasSize | , |
std::is_integral< decltype(std::declval< T &>().size())>::value | |||
) |
Traits::CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK | ( | IsReservable | , |
std::declval< T & > | ).reserve(0u | ||
) |
Traits::CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK | ( | IsIteratable | , |
std::begin(std::declval< T &>()) ! | = std::end(std::declval< T &>()) CPP_UTILITIES_PP_COMMA void() CPP_UTILITIES_PP_COMMA++std::declval< decltype(begin(std::declval< T &>())) &>() CPP_UTILITIES_PP_COMMA void(*begin(std::declval< T &>())) |
||
) |