Pure Factory Functions 💔 `inout`
Kagamin
spam at here.lot
Fri Feb 10 12:53:07 UTC 2023
On Thursday, 9 February 2023 at 18:47:17 UTC, Steven
Schveighoffer wrote:
> a `pure` function which takes an `inout` reference and returns
> a `mutable` reference should always be implicitly convertible
> to anything you want. It's no different from `const` in this
> regard.
That's a weakly pure function, so its return value can convert
only to const. Maybe it can convert to inout too, but the
language doesn't recognize this pattern.
More information about the Digitalmars-d
mailing list