The new C++ (C++0x or C++11) has an new kind of enum, an "enum class" where the names are scoped to the enum (among other things).
enum class E {
VAL1, VAL2
};
void fun() {
E e = E::VAL1; // Qualified name
}
I'm wondering, however, if I can selectively use the unqualified name in a certain scope. Something like:
void fun() {
using E::*;
E e = VAL1;
switch (e) {
case VAL2: ...
I see I can write using E::VAL1
and get one value. But I don't want to do that for every value of a larger enum.