Answer by Maxim Egorushkin for Iterating through a boost::dynamic_bitset
Depends on your definition of more correct. A correct method probably must yield correct results on all valid inputs and be fast enough.find_first and find_next are there so that they can be optimized...
View ArticleAnswer by Fred Foo for Iterating through a boost::dynamic_bitset
find_first and find_next are the fastest way. The reason is that these can skip over an entire block (of dynamic_bitset::bits_per_block bits, probably 32 or 64) if none of them are set.Note that...
View ArticleIterating through a boost::dynamic_bitset
I have a boost dynamic_bitset that I am trying to extract the set bits from:boost::dynamic_bitset<unsigned long> myBitset(1000);My first thought was to do a simple 'dump' loop through each index...
View Article
More Pages to Explore .....