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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
So that implies it's not possible to do:

union {
  int value;
};

and just begin and end the lifetime of the sole union member? You always need
an alternative member that can become active.

That suggests that the specs for std::optional and std::expected<void, T> are
broken and should have an additional exposition-only member of the union.

Reply via email to