|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-04-16 08:11:26
"Andrea Torsello" <torsello_at_[hidden]> writes:
> const rvalues get treated like non-const rvalues.
> I never noticed it because I never return const temporaries,
> but the same happens on gcc 3.3.1.
That's actually OK. The compiler is allowed to "copy" a const rvalue
into a non-const rvalue, and then elide the copy. So in general
there's nothing to prevent you from moving from a const rvalue.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk