More tricky range semantics
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 15 15:25:38 PST 2015
On 1/15/15 12:53 PM, H. S. Teoh via Digitalmars-d wrote:
> This issue is already latent in almost*all* Phobos algorithms. We
> only haven't discovered it yet because most people just use arrays for
> ranges. But all it takes is for somebody to start using
> std.range.inputRangeObject (and there are cases where this is
> necessary), and this problem will surface.
There's a distinction here. Input non-forward ranges can be considered
"reference" because popFront()ing any copy is tantamount to
popFront()int any other copy. -- Andrei
More information about the Digitalmars-d
mailing list