
Ion, With your current move-emulation approach, it looks like functions like vector::push_back could actually capture genuine rvalues, similar to how operator= does, via BOOST_COPY_ASSIGN_REF( T ) for movable types T (and using const T& for nonmovable types). For example: template< class T > T factory() { ... } template< class T, ... > struct vector { ... typedef boost::mpl::if_< boost::is_movable<T>, BOOST_COPY_ASSIGN_REF( T ), const T& >::type const_lvalue_reference_type; ... push_back(const_lvalue_reference_type value); push_back(BOOST_RV_REF( T ) value); }; ... vector<T> v; v.push_back(factory()); // should call rvalue push_back, right? AFAIK, if you use push_back(const T&) for movable types (as is standard), then that overload would be preferred in the absence of true rvalue references. What do you think? - Jeff