This adds a check to weak_ptr::_M_assign() so that calling __enable_shared_from_this_helper twice with the same pointer won't change which shared_ptr object the weak_ptr shares ownership with. On the lib reflector Peter Dimov convinced me that the boost::enable_shared_from_this behaviour is preferable to what we do now. I'm writing a proposal to specify this in the standard, but am changing it now in our implementation. Tested powerpc64le-linux, committing to trunk.