about const ref
Ferhat Kurtulmuş
aferust at gmail.com
Tue Feb 11 10:27:22 UTC 2020
On Tuesday, 11 February 2020 at 09:20:11 UTC, Mathias Lang wrote:
> On Tuesday, 11 February 2020 at 07:51:04 UTC, Ferhat Kurtulmuş
> wrote:
> You're correct for 'a' and 'b'. However `in` only entails
> `const`, so it is not an exact replacement.
> Additionally, you might want to add `scope` to show that the
> parameter does not escape.
>
> Note that a big limitation on `const ref` parameters at the
> moment is that it does not accept literals, which is something
> Andrei talked about a few years ago at DConf (or was it last
> year?).
Thank you for clarification.
More information about the Digitalmars-d-learn
mailing list