Is there an efficient way to test subranges in std::bitset
? This seems to suggest not.
I see std::bitset::any
and std::bitset:all
(for C++11), but they are for the whole set, not a subrange. What I was hoping for was an overloaded version of any
and all
. Something like:
bool all(size_t off, size_t len) const;
std::bitset::test
is also just a single bit. Theoretically, I could construct bitsets to bit twiddle against, but these bitsets will be fairly large and this might not be reasonable.
Thoughts?
Thanks!