https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117475
--- Comment #6 from Sebastian Huber <sebastian.hu...@embedded-brains.de> --- (In reply to Andrew Pinski from comment #1) > >It works with clang 17.0.6: > > It is rejected for me with both libstdc++ and libc++ with clang with > -std=c++20: > > <source>:14:3: error: call to implicitly-deleted default constructor of 'U' > 14 | U obj; > | ^ > <source>:11:5: note: default constructor of 'U' is implicitly deleted > because variant field 's' has a non-trivial default constructor > 11 | S s; > | ^ > > https://godbolt.org/z/o7fnP8cjM > > Are you sure you are testing the correct thing with clang? I used the clang 17.0.6 from openSUSE Leap 15.6. With the clang from godbolt.org I get also failures.