Boost logo

Boost :

Subject: Re: [boost] [move] [range] move algorithm (was: interest: the pass-by-value...)
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2014-02-19 03:53:45


On 19-02-2014 02:51, Eric Niebler wrote:
> On 02/18/2014 10:30 AM, Neil Groves wrote:

>> I agree that many scenarios would end in much unhappiness! I disagree that
>> unhappiness is pretty much guaranteed. I believe there are valid scenarios
>> that would be broken by increasing the requirements to demand single-pass
>> traversal. The most common case that I think would be broken in my own code
>> is where I am using a random-access iterator to stride.
>
> Why in the world does a stride iterator need to be random-access? Here
> is a strided range adaptor that works with input iterators:
>
> https://github.com/ericniebler/range-v3/blob/master/include/range/v3/view/stride.hpp
>
> It's not even hard.

I guess it may have been because it was the easiest. I see you have
special handling of bidirectional iterators. Anyway, nice to see your
improvements. :-)

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk