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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
The _M_empty = {} is necessary for correctness, not just clang, otherwise the
union has an active member (_M_value) that's out of lifetime and the error is
correct.

With that assignment, our problem is the empty class optimization in
build_over_call trivial op= handling that doesn't actually assign, so constexpr
doesn't know that the code tried to make _M_empty active.

Reply via email to