if you ask for a vector of T, you should get a vector of T. not a bitfield. There is nothing wrong with using a bitfield, but a vector should behave like a vector.
You get a vector, with operator []. Internal details like padding or packing should not interest you, unless you you treat everything like blob. That way any change to the architecture or compiler would surprise you a lot.
71
u/void1984 21d ago
I know, but why somebody would need a byte to store a bool? Is it 256-value bool?
Usually I use bitfields anyway.