DIP 1016--ref T accepts r-values--Final Review
12345swordy
alexanderheistermann at gmail.com
Mon Nov 19 00:50:47 UTC 2018
On Sunday, 18 November 2018 at 15:55:11 UTC, Rubn wrote:
> On Saturday, 17 November 2018 at 14:49:26 UTC, kinke wrote:
>> [...]
>
> If that's the case then it'll look something like this, for
> just 3 parameters if you want the old behavior:
>
> void lval_only(int x, int y, int z) @disable;
> void lval_only(int x, int y, ref int z) @disable;
> void lval_only(int x, ref int y, ref int z) @disable;
> void lval_only(ref int x, int y, ref int z) @disable;
> void lval_only(ref int x, ref int y, int z) @disable;
> void lval_only(int x, ref int y, int z) @disable;
> void lval_only(ref int x, int y, ref int z) @disable;
>
> void lval_only(ref int x, ref int y, ref int z);
>
> Not really ideal, I might be missing one, hard to tell.
How about void lval_only(ref int x, ref int y, ref int z)
@disable(rvalue)? Would that be easier?
Alex
More information about the Digitalmars-d
mailing list