I\'m working with a user-defined quantity of bits (I\'m holding a three-dimensional array of bits, so the size increases cubically - assume no less then 512 bits), and need
The critique is that vector
is the only standard container that doesn't fully conform to the standard's container requirements. That's a bit of a surprise.
Another point is that vector
forces a space optimization on everyone (by storing bits), when perhaps some users would have preferred a speed optimization.
Other than that, the major deviation is that the container cannot return a reference to its members, because it doesn't store any bools. That will make the odd standard library algorithm fail to compile for vector
.
If you can live with that, and it fits your needs for everything else, it is quite ok to use it.