Hello sirs, you might know that Boost has a dynamic_bitset class, but did you know that GCC also has it? Turns out it's included in the tr2 folder. You can simply include <tr2/dynamic_bitset>, and use it as tr2::dynamic_bitset.
The implementation seems identical to Boost's dynamic bitset, so you can read the full docs here.
Some notable things I saw: - They include more set operations, such as set difference, and checking if a bitset is a subset of another bitset. - They include lexicographical comparisons between bitsets. - You can append bits, as well as whole blocks (i.e. integers) - You can also resize it like a vector.
Of course, it also has all the normal std::bitset functionality. I'm not sure how good the performance is for this, so you can let me know in the comments.