3

有没有办法以相反的顺序遍历 boost::dynamic_bitset ?我的意思是我们通常通过 find_first() 找到第一个设置位,然后使用 find_next() 继续。

是否有任何相应的 find_last() 和 find_prev() 或任何其他方式来实现相同的?

4

1 回答 1

0

It looks like there isn't any out-of-the-box way to do that, so an own version needs to be created using indexes, size() and test().

You might also consider preparing a patch (with find_last() and find_prev() as member functions) and submit it to Boost!

于 2012-10-03T14:40:19.090 回答