
26 Jul
2009
26 Jul
'09
11:46 p.m.
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