|
Boost Users : |
Subject: Re: [Boost-users] [Range] Sliced range adaptor, alternative for non RandomAccessRanges?
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2011-01-26 09:23:58
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net