
----- Original Message ----- From: "Ion GaztaƱaga" <igaztanaga@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, February 17, 2009 11:00 PM Subject: [boost] [move] Library uploaded to sandbox
Hi to all,
I've uploaded a new version of the move emulation library to sandbox. I've put it temporarily in "move_semantics" folder to avoid overwriting current move code.
<snip>
I've personally added to the library all that I've seen useful for move-aware containers, so it might lack some features (move aware algorithms, for example).
Hi, I was wondering if we can define a implicit conversion from rv<Derived>& to rv<Base>& if is_convertible<Derived,Base> template <typename U> typename enable_if<move_detail::is_convertible<T,U>, rv<U>&>::type convert_to() { return (static_cast<rv<U>& >(static_cast<U&>(*this))); } template <typename U> operator rv<U>&() { convert_to<U>(); } With this implicit conversion the Derived(BOOST_RV_REF(Derived) x) // Move ctor : Base(boost::move(static_cast<Base&>(x))), mem_(boost::move(x.mem_)) { } could be Derived(BOOST_RV_REF(Derived) x) // Move ctor : Base(x), mem_(boost::move(x.mem_)) { } What do you think? Vicente