Isn't this natively supported by C++?
Something like
struct MyStruct
{
int myint : 14;
int flagA : 1;
int flagB : 1;
};
I can't remember if that's the exact syntax but I'm sure I've seen
something like that in the wild. It might be a compiler extension(?)
Ian.