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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #6)
> 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.

So this was wrong; a member whose lifetime has ended is not active, by
definition.
https://eel.is/c++draft/class.union#general-2

Fixed.

Reply via email to