On 7/9/12 10:31 AM, Mehrdad wrote:
On Monday, 9 July 2012 at 14:21:33 UTC, Andrei Alexandrescu wrote:
Huh? You don't... it's an input iterator, not an output iterator!
The idea of an input range is that it works seamlessly with the more
capable ranges.
Andrei
You mean 'foreach'? That should be using opApply if it wants to take
outputs by ref, not input range capabilities.
Or is there some other constructor you're referring to? Because I don't
see any overlap in the constructs between input and output ranges.
I think it's about the notion of "input range" that is confusing, a
better name would be "single-pass range". One should be perfectly
capable of assigning to elements of an input range. A built-in slice is
an input range.
Andrei