https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120088
Jiang An <de34 at live dot cn> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #2 from Jiang An <de34 at live dot cn> --- I think GCC and MSVC are right here and libstdc++ is also fine. The divergence is probably due to that Clang and EDG haven't implemented CWG2658 (https://cplusplus.github.io/CWG/issues/2658.html). A more reduced example: ``` struct expected_like { union { struct { } m_dummy {}; int m_unex; }; }; constexpr bool quux() { using I = int; expected_like foo1{.m_unex{}}; foo1.m_unex.~I(); [[maybe_unused]] expected_like foo3{foo1}; return true; } static_assert(quux()); ``` https://godbolt.org/z/Y64M4YMPP