I tried using boost::dynamic_bitset, but it has a few issues with my specific use-cases...
So I'll just roll my own and make it ✨ super fancy ✨ as per usual!
There's some commits in this PR that I should probably cherry pick into some other branches.
Issues with boost::dynamic_bitset
Applying logical operations requires bitsets to be of the same size for no good reason.
... which means, I have to allocate if I want to compare efficiently. Or I skip the resizing and compare manually but super slow..
Comparisons are very odd and don't mimic the correct behavior of standard containers like std::vector<bool>.
bitset[0] should be the most significant bit, yet bitset[word_bits - 1] seems to be the most significant.
No way of finding the last set bit.
Didn't really need it yet, but might come in handy at some point. Still dumb that it's missing.
Brings in quite a bit of other boost stuff just for a bitset.
Also, there's no CMake targets because it's header only... Ever heared of INTERFACE targets? sigh
I tried using
boost::dynamic_bitset
, but it has a few issues with my specific use-cases...So I'll just roll my own and make it ✨ super fancy ✨ as per usual!
There's some commits in this PR that I should probably cherry pick into some other branches.
Issues with
boost::dynamic_bitset
std::vector<bool>
.bitset[0]
should be the most significant bit, yetbitset[word_bits - 1]
seems to be the most significant.boost
stuff just for a bitset. Also, there's no CMake targets because it's header only... Ever heared ofINTERFACE
targets? sighSo yeah... Reinventing the wheel once again!