On Tue, Nov 30, 2010 at 12:53 PM, Roman Kononov <ro...@binarylife.net> wrote:
> 2010-11-30 20:40 CST, Jonathan Wakely <jwakely....@gmail.com> said:
>>However, that doesn't change the fact you're trying to move from a
>>const object, which is obviously wrong.
>
> Not really, because the 2 const objects are about to be destroyed.

The fact that the objects are about to be destroyed makes it
reasonable to bind an rvalue reference to them -- but it doesn't make
it reasonable to bind any kind of non-const reference to them (and an
rvalue-ref-to-const is a strange and largely useless beast).

If you want to be able to change an object during its lifetime, don't
make it const.

-- James

Reply via email to