需要修改
#if defined(BOOST_MOVE_DOXYGEN_INVOKED) //! This function provides a way to convert a reference into a rvalue reference //! in compilers with rvalue reference. For other compilers converts T & into //! <i>::boost::interprocess::rv<T> &</i> so that move emulation is activated. template <class T> inline rvalue_reference move (input_reference); #else //template <class T> inline //typename remove_reference<T>::type&& move(T&& t) //{ return t; } template <class T> inline typename remove_reference<T>::type&& move(T&& t) { return t; } #endif
对return t;做一个强制转换
#if defined(BOOST_MOVE_DOXYGEN_INVOKED) //! This function provides a way to convert a reference into a rvalue reference //! in compilers with rvalue reference. For other compilers converts T & into //! <i>::boost::interprocess::rv<T> &</i> so that move emulation is activated. template <class T> inline rvalue_reference move (input_reference); #else //template <class T> inline //typename remove_reference<T>::type&& move(T&& t) //{ return t; } template <class T> inline typename remove_reference<T>::type&& move(T&& t) { return static_cast<remove_reference<T>::type&&>(t); } #endif