Boost logo

Boost :

Subject: Re: [boost] AlRangeExandrescu?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-26 18:24:49


Thorsten Ottosen wrote:
> Thorsten Ottosen skrev:
>> Andrei Alexandrescu skrev:
>>> Thorsten Ottosen wrote:
>>>> Ok, but the problem with lazy ranges is that when you compose it with
>>>> range adaptors, then it greatly limits the adaptors that you can
>>>> subsequently apply.
>>> Why is that the case?
>> because some adapters require random aceesss ranges e.g.
>> rng | stride_view
>> 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.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at