
Neal Becker <ndbecker2@verizon.net> writes:
David Abrahams wrote:
"Neal D. Becker" <nbecker@hns.com> writes:
This handy little item, lvalue_cast, would make a useful addition to boost. I didn't write it, and I don't recall who did.
The problem with that is that casting away the const on a const rvalue is sometimes unsafe. See the original move semantics proposal for details.
Not sure what you're saying here. I agree it can sometimes be unsafe. That's why you shouldn't use it - except when you really want to. Isn't that consistent with the move semantics proposal?
No. Nothing in the move semantics proposal suggests that the constness of a const rvalue should be removed. It only changes const rvalues into const lvalues. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com