
Have you seen the proposed "enum class" ? http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
No I hadn't seen that - cheers - looks very interesting. Certainly more than capable of rectifying the issue I was looking at.
Until/unless this is adopted, maybe some macro-magic could be used to implement it, e.g.
ENUM_CLASS(foo) { ENUM(foo_1,1<<0) , ENUM(foo_2,1<<1) };
This would need to expand to an enum wrapped in a class, as described in section 2.1 of the doc linked above. I'm not certain if this can be done with macros, but the Boost preprocessor library has lots of magic that would help.
Yeah I can see how that might work - I'll have a play around and see if I can come up with anything, might well prove much more useful than my original proposal anyway. Cheers IAIN