Implement my own dynamically sized bitset. #120
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
... which means, I have to allocate if I want to compare efficiently. Or I skip the resizing and compare manually but super slow..
std::vector<bool>
.bitset[0]
should be the most significant bit, yetbitset[word_bits - 1]
seems to be the most significant.Didn't really need it yet, but might come in handy at some point. Still dumb that it's missing.
boost
stuff just for a bitset.Also, there's no CMake targets because it's header only... Ever heared of
INTERFACE
targets? sighSo yeah... Reinventing the wheel once again!