Describe the enhancement requested
VisitBitRuns, VisitSetBitRuns, VisitTwoSetBitRuns are useful in many cases but some times the caller needs to control the control flow, for example for returning early.
So it would be nice to be able to write:
for (const auto run : IterateBitRuns(bitmap, offset, length)) {
// do something with run.position, run.length, run.set
}
// or:
for (const auto run : IterateSetBitRuns(bitmap, offset, length)) {
// do something with run.position, run.length
}
// or:
for (const auto run : IterateTwoSetBitRuns(
left_bitmap, left_offset, right_bitmap, right_offset, length)) {
// do something with run.position, run.length
}
The same transformation could be done for VisitBitBlocks, VisitTwoBitBlocks.
Component(s)
C++
Describe the enhancement requested
VisitBitRuns,VisitSetBitRuns,VisitTwoSetBitRunsare useful in many cases but some times the caller needs to control the control flow, for example for returning early.So it would be nice to be able to write:
The same transformation could be done for
VisitBitBlocks,VisitTwoBitBlocks.Component(s)
C++