I have a C API that defines an enum like so:
typedef enum { C_ENUM_VALUE_NONE = 0, C_ENUM_VALUE_APPLE = (1 << 0), C_ENUM_VALUE_BANANA = (1
CEnumType A;
A = (CEnumType)(A | C_ENUM_VALUE_APPLE);
You can use it this way too.