I have some generic code that works with flags specified using C++11 enum class types. At one step, I\'d like to know if any of the bits in the flag are set. Cu
enum class
Like @RMatin says. But you could overload operator!
operator!
bool operator!(E e) { return e == static_cast(0); }
So that you can use the !!e idiom
!!e
if(!!e) { ... }