Ticket #7418: boost-move-1.53.diff
File boost-move-1.53.diff, 1.5 KB (added by , 9 years ago) |
---|
-
boost/move/core.hpp
50 50 void operator=(rv const&); 51 51 } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; 52 52 53 ////////////////////////////////////////////////////////////////////////////// 54 // 55 // struct rv_wrapper 56 // 57 ////////////////////////////////////////////////////////////////////////////// 58 template <class T> 59 class rv_wrapper 60 { 61 ::boost::rv<T>& ref_; 62 public: 63 rv_wrapper(::boost::rv<T>& iref) : ref_(iref) {} 64 operator ::boost::rv<T>& () { return ref_; } 65 }; 53 66 54 67 ////////////////////////////////////////////////////////////////////////////// 55 68 // … … 118 131 >& \ 119 132 // 120 133 134 #define BOOST_RV_REF_WRAPPER(TYPE)\ 135 ::boost::rv_wrapper< TYPE > 136 121 137 #define BOOST_FWD_REF(TYPE)\ 122 138 const TYPE & \ 123 139 // … … 269 285 const TYPE & \ 270 286 // 271 287 288 //!This macro is used to achieve portable syntax in move 289 //!constructors and assignments for classes marked as 290 //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE 291 //!It should be used in order to avoid implicit conversion of a 292 //!type into boost::rv<type>. 293 #define BOOST_RV_REF_WRAPPER(TYPE)\ 294 BOOST_RV_REF( TYPE ) 295 272 296 //! This macro is used to implement portable perfect forwarding 273 297 //! as explained in the documentation. 274 298 #define BOOST_FWD_REF(TYPE)\