Subject: Re: [boost] AlRangeExandrescu?
From: Andrei Alexandrescu (andrei_at_[hidden])
Date: 2009-07-25 10:13:31
Thorsten Ottosen wrote:
> Andrei Alexandrescu skrev:
>>>> Surprisingly, until() also works on input ranges! It works because
>>>> it finds the element lazily - it returns a range that tests for
>>>> termination condition in its .empty() test. So until() returns a
>>>> range that iterates the original passed-in range until the sought
>>>> element is found, at which time until() reports termination.
> Is until lazy for all types of ranges? Being lazy is often good, but
> it's so nice to compose a lazy range with other types of ranges.
Yes, until is lazy. I think it couldn't be implemented any other way for
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk