#ifndef CPP_UTILITIES_TRAITS_H #define CPP_UTILITIES_TRAITS_H #include namespace Traits { namespace Detail { enum class Enabler {}; } template using Conditional = typename std::conditional::type; template struct Bool : std::integral_constant {}; template using Not = Bool; template struct Any : Bool {}; template struct Any : Conditional, Any > {}; template struct All : Bool {}; template struct All : Conditional, Bool > {}; template using EnableIf = typename std::enable_if::value, Detail::Enabler>::type; template using DisableIf = typename std::enable_if::value, Detail::Enabler>::type; template using EnableIfAny = typename std::enable_if::value, Detail::Enabler>::type; template using DisableIfAny = typename std::enable_if::value, Detail::Enabler>::type; } #endif // CPP_UTILITIES_TRAITS_H