When we have,
struct E { enum E_ { HELLO }; }; // \'E\' is inheritable
then why do we need,
enum class E { HELLO }; // \'E
Yes, we do. Looks like no one pointed out this before. What about if you need to set size of an enum and keep still according to C++ standard? enum class can do. And with type safety as already mentioned. It's reduce so much possible bugs in code and the mess to mixing int and enums. They wasn't never the same thing for me. Amazing. e.g., enum class foo : int16_t { ... } I'm sure each member is an int16_t and not up to implementation decide what's "better" for me.
EDIT:
Also, we can have duplicated values (not names) in the list. Which make a lot of sense depending to context.