Problem: Get the first N element of a SinglePassRange. It is not possible with sliced, because it requires RandamAccessRange.
Note that this is possible with the 'taken' range adaptor [1] in the Boost.Range Extensions library [2] proposed by Akira Takahashi, which is on the review schedule [3], atlhough with no review date set yet. The equivalent of sliced(n, m) for SinglePassRanges is also possible by combining the 'taken' and 'dropped' [4] adaptors from that library: range | taken(n) | dropped(m) // same elements as 'range | sliced(n, m)' Regards, Nate [1] http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_ex... [2] http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/index.ht... [3] http://www.boost.org/community/review_schedule.html [4] http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_ex...