
26 Jul
2009
26 Jul
'09
7:59 a.m.
Thorsten Ottosen skrev:
Andrei Alexandrescu skrev:
Thorsten Ottosen wrote:
A "not" slipped here.
Yes, until is lazy. I think it couldn't be implemented any other way for input ranges.
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. -Thorsten