I understand it\'s possible to use bitmasks in enum values, but I don\'t know how to create it.
I have a simple enum :
enum State { minimizing = 0,
I just tried this in VS2012, the optimizer seems to correctly combine bits without any need for assistance if you're using bitfields.
struct BITS { int x: 1; int y:1; };
then
BITS b; b.x = b.y = 1;
Sets both bits with one instruction.