No, It is Immpossible. The preprocessor is pretty dumb and it doesn't know the structure of your program. If T::Doo not defined in the preprocessor (and this cannot be, due to :: , it cannot evaluate this expression and will fail.
However, you can rely on the compiler to do the smart thing for you:
if (T::Doo & 0x010) {
Constant expressions and dead branches are optimized even with lower optimization settings, so you can safely do this without any utilities.
Thomas
source share