front stability
Jack Stouffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 30 08:04:11 PDT 2016
On Thursday, 30 June 2016 at 14:59:11 UTC, jmh530 wrote:
> It looks like this is just documentation changes. This really
> doesn't prevent anyone from making a Range that violates front
> stability.
No, but what it will do is to make it clear that these are either
bugs or intended behavior, as this is still a point of
disagreement.
> For instance, suppose isInputRange is changed so that
>
> auto h = r.front; // can get the front of the range
>
> becomes
>
> auto h = r.front; // can get the front of the range
> auto j = r.front;
> assert(h == j); //ensure front stability
This cannot be done at compile time.
More information about the Digitalmars-d
mailing list