What I want to do is this:

std::set<int> input;
input += 1,2,3,4,5,6,7,8,9;

boost::copy(
input | sliced(2, 5),


make_iterator_range() have similar functionality.

I guess it would make sense to extend sliced() to
work in terms of advance() too, so it can work even with input iterators.

Do you really want the slice to positional (i.e., positions 2-5) in that sequence, or do you want the slice to behave more like equal_range and select the range based on the values of the underlying sequence?

Andrew