See <https://wg21.link/P3106R1>. DR for C++98 and up.
Confirmed. I'm interested.
This paper was intended to correct the specification of existing behavior, so no compiler changes should be necessary, but we should verify that.
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:cea6473e48b4cfbf16f7b4a804f1562f8da8f25b commit r15-2152-gcea6473e48b4cfbf16f7b4a804f1562f8da8f25b Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Jul 19 08:53:47 2024 +0200 c++: Add [dcl.init.aggr] examples to testsuite When working on the #embed optimization support, I went recently through all of reshape_init_r* and today I read in detail all the P3106R1 changes and I believe we implement it that way for years. To double check that, I've added tests with the current [dcl.init.aggr] examples but tested in all the languages from C++98 to C++26, of course guarded as needed for constructs which require newer versions of C++. The examples come in two tests, one is a runtime test for the non-erroneous examples, the other is a compile time test for the diagnostics. The former one includes mostly intact examples with runtime checking (both to test what is written in the section exactly and to test at least something with C++98) and then when useful also adds constexpr tests with static_asserts for C++11 and later. Tested on x86_64-linux and i686-linux with GXX_TESTSUITE_STDS=98,11,14,17,20,23,26 make check-g++ RUNTESTFLAGS='dg.exp=aggr-init*.C' Also tested on GCC 11 branch with GXX_TESTSUITE_STDS=98,11,14,17,20,2b make check-g++ RUNTESTFLAGS='dg.exp=aggr-init*.C' where just the " is a GCC extension" part of one error is left out, otherwise it passes the same, ditto with clang 14 (of course with different diagnostics, but verified it emits diagnostics on the right lines), so I believe we can claim implementation of this DR paper, either in all versions or at least in GCC 11+. 2024-07-19 Jakub Jelinek <jakub@redhat.com> PR c++/114460 * g++.dg/cpp26/aggr-init1.C: New test. * g++.dg/cpp26/aggr-init2.C: New test.
I've additionally tested GCC 11.5, GCC 8.5 and GCC 4.8.5 and the aggr-init1.C test passes in all language variants that support it, had to tweak slightly the second testcase because of differences in in effective target and dejagnu directive format support and in the 4.8 case also for wording of one case, but otherwise it passed. So, I'm committing a Yes rather than a specific version which implemented this to cxx-status.html.
Also tested GCC 4.1 and 3.2 (that time only in C++98) and it also works expectedly.