DIP 1016--ref T accepts r-values--Formal Assessment
Olivier FAURE
couteaubleu at gmail.com
Thu Jan 31 21:46:23 UTC 2019
On Thursday, 31 January 2019 at 18:31:22 UTC, Steven
Schveighoffer wrote:
> BTW, the DIP discusses how to annotate these rare situations:
>
> int doubleMyValue(ref int x) { ... }
> @disable int doubleMyValue(int x);
>
> -Steve
I don't think that's a solution. The problem is in the getter
method, not in doubleMyValue. If nothing else, since the DIP is
designed to work on existing functions, it could happen on
doubleMyValue functions which would be both designed by and used
by people completely unaware of DIP-1016.
More information about the Digitalmars-d-announce
mailing list