rvalues -> ref (yup... again!)

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Mar 24 00:58:23 UTC 2018


On Friday, March 23, 2018 17:35:11 Manu via Digitalmars-d wrote:
> > but that by itself isn't
> > enough if you want it to be clear whether a function is supposed to be
> > mutating the argument
>
> Functions that receive const args make it pretty clear that they don't
> intend to mutate the arg.

Yes, but with how restrictive const is in D, I have a very hard time
believing that it's going to work well to start using const ref much even if
it accepted rvalues.

- Jonathan M Davis



More information about the Digitalmars-d mailing list