
Looking through the sources of Boost.Move in trunk, I am wondering about a couple of lines in <boost/move/move.hpp> that are part of the expansion of BOOST_MOVABLE_BUT_NOT_COPYABLE when BOOST_NO_RVALUE_REFERENCES is defined: #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ private:\ TYPE(TYPE &);\ TYPE& operator=(TYPE &);\ public:\ operator ::boost::rv<TYPE>&() \ { return *static_cast< ::boost::rv<TYPE>* >(this); }\ operator const ::boost::rv<TYPE>&() const \ { return *static_cast<const ::boost::rv<TYPE>* >(this); }\ private:\ // Why do the declarations of the copy constructor and copy-assign operator overload not take a const-reference to TYPE? When BOOST_NO_RVALUE_REFERENCES is not defined, they do: #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ public:\ typedef int boost_move_emulation_t;\ private:\ TYPE(const TYPE &);\ TYPE& operator=(const TYPE &);\ // Joseph Trebbien