DIP 1016--ref T accepts r-values--Formal Assessment
Dominikus Dittes Scherkl
dominikus at scherkl.de
Mon Feb 4 18:32:56 UTC 2019
On Monday, 4 February 2019 at 17:09:25 UTC, bitwise wrote:
> I think this solves all of the above:
>
> fun(10);
> ==>
> (int __temp0){ (return)? fun( __temp0 ); }(10);
>
> -The expression/statement issue is solved by the closure
> -The initialization issue created by the ":=" approach is not
> present here
> -For this rewrite, 'T' is the type of the rvalue argument, not
> the type of the function parameter. This prevents undesired
> implicit conversions.
I don't understand this.
What does "(return)?" mean? Is this valid D syntax? What do I
miss?
More information about the Digitalmars-d-announce
mailing list