Const ref and rvalues again...

Timon Gehr timon.gehr at gmx.ch
Mon Oct 22 02:41:38 PDT 2012


On 10/22/2012 11:38 AM, Timon Gehr wrote:
> On 10/22/2012 12:18 AM, martin wrote:
>> On Friday, 19 October 2012 at 00:03:49 UTC, Timon Gehr wrote:
>>> Const is different in D and in C++. Relating const and rvalues is
>>> arbitrary and does not make a lot of sense.
>>
>> It's actually pretty much the same concept in both languages except for
>> the transitiveness in D.
>
> Case closed.
>

(But it might be added that C++11 adds a new language feature just in 
order to be able to distinguish const and rvalue references in the
callee, so even with C++'s semantics, this does not seem like a good
idea.)


More information about the Digitalmars-d mailing list