rvalue references
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 19 12:19:45 PDT 2016
Am Wed, 19 Oct 2016 11:29:50 +0200
schrieb Timon Gehr <timon.gehr at gmx.ch>:
> Yes, the lack of rvalue references can be annoying but 'const' should be
> orthogonal to any implemented solution.
>
> There should be a way to pass rvalues by reference that are not
> prevented from being mutated, and it should be the same way as for const
> references. (For example, one possible approach is to just allow rvalues
> to bind to all 'ref' parameters (as is done for the implicit 'this'
> reference), alternatively there could be some additional "allow rvalues
> here" annotation that does not influence mutability.)
Ok, got ya now!
--
Marco
More information about the Digitalmars-d
mailing list