https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112335
--- Comment #2 from Federico Kircheis <federico at kircheis dot it> --- > Well s::~s could touch the reference std::unique_ptr<s> (ps1). In both cases, s::~s is called only once. Also during the move-assignment no user-provided-code is involved (except the destruction of ps1, and even case of a user-provided deleter, it is only called if the pointer is not nullptr.