Because an enum declaration does not introduce a scope, an enum name cannot be used as a scope qualifier. For example, the following code is invalid.
enum E {e1, e2, e3}; int i = E::e1; // invalid: E is not a scope name
To compile this invalid code, use the -features=extensions option. The -features=extensions option instructs the compiler to ignore a scope qualifier if it is the name of an enum type.
To make the code valid, remove the invalid qualifier E::.