Boost Range Library: Traversing Two Ranges Sequentially

后端 未结 3 1674
日久生厌
日久生厌 2020-12-19 11:50

Boost range library (http://www.boost.org/doc/libs/1_35_0/libs/range/index.html) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges int

3条回答
  •  天涯浪人
    2020-12-19 12:02

    • Can't you call the function twice, once for both ranges? Or are there problems with this approach?
    • Copy the two ranges into one container and pass that.
    • Write your own range class, so it iterates through r1 first and and through r2 second.

提交回复
热议问题