While qualifying an enumeration value with the name of the enumeration is not valid C++03, it is valid C++11, from what I understand. Despite this, MSVC 10 generates warning C4482 for the following:
enum E { A, B };
int i = E::A; // warning C4482 (but valid C++11?)
Since much of our code uses C++11 features (especially lambdas), it seems safe to disable this warning. Am I right that the code is valid C++11?
Note: I did not write the code in question, and I would prefer to not go through and change every occurrence of this.
Edit: Added some relevant links.
- MSDN page for the warning.
- Another question about the warning. The question and answers all seem to reference C++03.