On this question, there’s an answer that states:
You can use typedef to make Colour enumeration type accessible without specifying it’s ‘full name’.
typedef Sample::Colour Colour; Colour c = Colour::BLUE;
That sounds correct to me, but someone down-voted it and left this comment:
Using the scope resolution operator :: on enums (as in ‘Colour::BLUE’) is a compiler-specific extension, not standard C++
Is that true? I believe I’ve used that on both MSVC and GCC, though I’m not certain of it.
I tried the following code:
Visual C++ 9 compiled it with the following warning:
Doesn’t look like it’s standard.