Returning value by ref does not create a ref. Is this intentional?

Tejas notrealemail at gmail.com
Wed Jan 5 05:40:54 UTC 2022


On Wednesday, 5 January 2022 at 05:17:10 UTC, Stanislav Blinov 
wrote:


> It is returned. But initializing `c` with it makes a copy.

Oh...
Wish we had real `ref` ;(

> This will mutate `a`:
>
> ```
> func(a) = 10;
> ```



Thank you for your help!


More information about the Digitalmars-d-learn mailing list