C++ actually does this 'optimisation' for std::vector<bool>. I say 'optimisation' because it effectively trades time for space, which is usually the opposite of what you want - space is cheap, time usually isn't.
Sometimes it's a good tradeoff though - it's common in embedded development where you might only have a few kB of RAM.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments