https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125565
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Boost explicitly documents this behaviour for weak_from_this():
Note:
Unlike shared_from_this(), weak_from_this() is valid in a destructor and
returns a
weak_ptr that is expired() but still shares ownership with other weak_ptr
instances
(if any) that refer to the object.
i.e. it is expected that the weak-this member still refers to the control block
even during the object's destructor, so it has to be true before that when
invoking the deleter.