There are two conflicting definitions of enum class in Visual C++ 2012:
- The C++11, type-safe version of
enum - The C++/CLI,
System::Enumderived type, equivalent to aref classwith static const integral members.
Does the meaning of enum class change when you enable or disable the /clr switch?
A managed enumeration must have an access specifier (either
publicorprivate). A C++11 scoped enumeration must not have an access specifier. For example,Eis valid in C++, C++/CLI, and C++/CX, and it is an ordinary C++ scoped enumeration.FandGare valid only in C++/CLI and C++/CX, and they name a managed enumeration (in C++/CLI) or a Windows Runtime enumeration (in C++/CX).