ISO/IEC 14882:2011 section 7.1.6.3 [dcl.type.elab]/3 states: "[...] the enum keyword shall be used to refer to an enumeration [...]".When using an elaborated type specifier for a scoped enumeration, Visual C++ incorrectly requires "enum class":enum class E { };enum class E e1; // incorrect, but compilesenum E e2; // correct, but yields: error C3431: 'E' : a scoped enumeration cannot be redeclared as an unscoped enumerationIntellisense parses this correctly, and complains about the variant the compiler accepts.
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...