Ticket #7952: move-assignment.patch
File move-assignment.patch, 898 bytes (added by , 10 years ago) |
---|
-
doc/move.qbk
129 129 130 130 clone_ptr& operator=(clone_ptr&& p) 131 131 { 132 std::swap(ptr, p.ptr); 133 delete p.ptr; 134 p.ptr = 0; 132 if (this != &p) 133 { 134 std::swap(ptr, p.ptr); 135 delete p.ptr; 136 p.ptr = 0; 137 } 135 138 return *this; 136 139 } 137 140 … … 171 174 172 175 * Put the following macro in the [*private] section: 173 176 [macroref BOOST_COPYABLE_AND_MOVABLE BOOST_COPYABLE_AND_MOVABLE(classname)] 174 * Le ftcopy constructor as is.177 * Leave copy constructor as is. 175 178 * Write a copy assignment taking the parameter as 176 179 [macroref BOOST_COPY_ASSIGN_REF BOOST_COPY_ASSIGN_REF(classname)] 177 180 * Write a move constructor and a move assignment taking the parameter as