|
Boost : |
Subject: Re: [boost] AlRangeExandrescu?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-07-26 19:46:23
Steven Watanabe skrev:
> AMDG
>
> Thorsten Ottosen wrote:
>>>> Why is that the case?
>>>
>>> and some requires bidirectionsal ranges e.g.
>>>
>>> rng | reverse_view
>>
>> And also many later operations are usually more efficient when e.g.
>> random access is preserved.
>
> If only one form of the range adapters is provided, then
> the lazy form is better, because it is possible to implement
> the greedy version in terms of the lazy one, but not vice versa.
I think almost all the adaptors are lazy. But that is a somewhat
different issue than until() being lazy because until() will be used to
form the initial range that adaptors adapt. If until() returns a
single-pass range, then the example above fails to work.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk