Is there a type trait, or is it possible to write a type trait is_scoped_enum such that:
is_scoped_enum
T
I think testing if it is an enum and not implicitly convertible to the underlying type should do the trick.
template ::value> struct is_scoped_enum : std::false_type {}; template struct is_scoped_enum : std::integral_constant::type>::value> {};