https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180
--- Comment #11 from Tomasz KamiĆski <tkaminsk at gcc dot gnu.org> --- > I think it would be worth making an issue for this, either with CWG or LWG. > Not sure which would make more sense here. We need an LWG issue to say that stored object may be nested within any, polymoprhic, function, move_only_function, and copyable_function. I.e. everywhere were we allow SSO. I do not think there is need for CWG issues, overlaping objects are still distinct object (they just live under same address), so this should be fine, as each of destructor destroy different object p->~S(); s.~S();
