1

Consider this code:

enum CEnum {
    V1, V2;
};

enum class CppEnum {
    V1, V2;
};

Both std::is_enum<CEnum>::value and std::is_enum<CppEnum>::value is true.

I'm now searching for something like std::is_enum_class<T>::value to tell them apart.

nyronium
  • 1,258
  • 2
  • 11
  • 25
  • 2
    likely duplicate of [C++11 type trait to differentiate between enum class and regular enum](https://stackoverflow.com/questions/15586163/c11-type-trait-to-differentiate-between-enum-class-and-regular-enum) or [How to implement is_enum_class type trait?](https://stackoverflow.com/questions/26936640/how-to-implement-is-enum-class-type-trait) – underscore_d Nov 09 '17 at 12:26

0 Answers0