26 Jan
2011
26 Jan
'11
2:23 p.m.
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