
Daniel Wallin <dalwan01@student.umu.se> writes:
One thing I think we overlooked in the move proposal, though, is the fact that "only movable and not copyable" class rvalues *still* can't legally be passed where a const reference is expected, unless the rule in question is lifted. That seems like a problem to me.
That is true if the class would declare regular move constructors with rvalue references. But doesn't the trick used to implement move_ptr apply with the new rvalue references as well? (moving with const& constructor)
X x; X y(static_cast<X&&>(x)); // should bind to X(X const&) and not // generate an error?
So technically the rule doesn't need to be lifted if we get rvalue references.
OK, you're right. But that's really awful. :(. -- Dave Abrahams Boost Consulting www.boost-consulting.com