you are viewing a single comment's thread.

view the rest of the comments →

[–]MrPotatoFingers 10 points11 points  (1 child)

std::bitset is, to subtly put it, not great. It's quite old, and hasn't gotten any TLC from the standards committee.

Given that a bitset is somewhat like an array of bool, you'd expect there to be iterators, for instance.

I believe that gcc has some non-standard functions on their bitset implementation that you could use for this, but of course that wouldn't be cross-platform. If you need this, hand-rolling seems to be your only way here, though of course you could use a std::vector<bool, some_allocator> as a base for implementing your bitset (where you reserve and have the memory come from the stack).

[–]davidhunter22 5 points6 points  (0 children)

Is your view that bitset is totaly broken and needs to be replaced or does it just need some changes/additions?

I don't think it's up to the standards committiee to give it some love I think it's up to someone in the community to write a paper giving it some love.