Ticket #7952: move-assignment.patch

File move-assignment.patch, 898 bytes (added by Akim Demaille <akim.demaille@…>, 10 years ago)

More doc fixes

  • doc/move.qbk

     
    129129
    130130      clone_ptr& operator=(clone_ptr&& p)
    131131      {
    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         }
    135138         return *this;
    136139      }
    137140
     
    171174
    172175* Put the following macro in the [*private] section:
    173176  [macroref BOOST_COPYABLE_AND_MOVABLE BOOST_COPYABLE_AND_MOVABLE(classname)]
    174 * Left copy constructor as is.
     177* Leave copy constructor as is.
    175178* Write a copy assignment taking the parameter as
    176179  [macroref BOOST_COPY_ASSIGN_REF BOOST_COPY_ASSIGN_REF(classname)]
    177180* Write a move constructor and a move assignment taking the parameter as