https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125565

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We also explicitly called that out in the proposal that added weak_from_this to
C++17:

  weak_from_this can also be used in the object's destructor, after the
weak_this
  member has expired. weak_from_this can be used to get a weak_ptr that still
shares
  ownership with any other weak_ptr objects that still exist after the last
"strong"
  reference has been released by the last shared_ptr.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0033r1.html

Reply via email to