More tricky range semantics
Joseph Rushton Wakeling via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 16 09:17:29 PST 2015
On Friday, 16 January 2015 at 17:13:33 UTC, Joseph Rushton
Wakeling wrote:
> I think you've misunderstood what I was getting at, probably
> because I didn't explain myself well.
There's a concrete example of the problem I can demonstrate from
some Phobos functionality, but off the top of my head I can't
remember what it is. I'll try and look it up when I get home
later this evening.
The essence is that, as a caller, I have this problem:
auto range = SomeReferenceTypeForwardRange(whatever);
foo(range); // prints one set of 10 values
foo(range); // should print different set of 10 values
// but won't because foo()'s implementation
// doesn't take into account possibility of
// reference type input
More information about the Digitalmars-d
mailing list