Is there a way to bring all enum constants into scope? I don't mean the type, I mean the constants themselves.
struct Foo {
enum Bar {
A = 1, B = 2, C = 4, D = 8
};
};
int main() {
using E = Foo;
int v = E::A | E::B | E::C | E::D;
// But is it possible to instead do...
using Foo::Bar::*; // (not real C++)
int v = A|B|C|D; // <-- all enum constants are brought into scope
}