DIP 1016--ref T accepts r-values--Community Review Round 1

Dukc ajieskola at gmail.com
Sat Jul 21 09:13:48 UTC 2018


On Friday, 20 July 2018 at 23:19:08 UTC, Nicholas Wilson wrote:
> On Friday, 20 July 2018 at 16:39:46 UTC, Dukc wrote:
>> How so? It could be made it act exactly as if the temporary 
>> was made just before the function call, meaning the lifetime 
>> would end at the end of current scope.
>>
>
> ... which is exactly what this DIP proposes ...
>

... except the compiler would do that only when appending .byRef.

>> Of course, this required compiler magic. A library solution 
>> would have exactly the limits you said.
>
> ... and why its a DIP, and not a phobos PR.

With that I agree.


More information about the Digitalmars-d mailing list