Returning value by ref does not create a ref. Is this intentional?
Dennis
dkorpel at gmail.com
Wed Jan 5 08:58:44 UTC 2022
On Wednesday, 5 January 2022 at 05:38:45 UTC, Tejas wrote:
> The entire reason I wanted to get a `ref` was so that I can
> avoid the `*` :(
I don't know what the real code behind the reduced example is,
but maybe you can structure your code such that the subsequent
modification `c = 10` happens in its own function. Then you can
pass the result of `func(a)` to that function by `ref`.
More information about the Digitalmars-d-learn
mailing list