On Mon, 8 Dec 2025 at 14:20, Yuao Ma <[email protected]> wrote:
>
> On Mon, Dec 8, 2025 at 6:52 PM Jonathan Wakely <[email protected]> wrote:
> >
> > On Mon, 1 Dec 2025 at 19:52, Patrick Palka <[email protected]> wrote:
> > >
> > > On Wed, 26 Nov 2025, Yuao Ma wrote:
> > > > diff --git 
> > > > a/libstdc++-v3/testsuite/23_containers/flat_multiset/constexpr.cc 
> > > > b/libstdc++-v3/testsuite/23_containers/flat_multiset/constexpr.cc
> > > > new file mode 100644
> > > > index 00000000000..860b7660809
> > > > --- /dev/null
> > > > +++ b/libstdc++-v3/testsuite/23_containers/flat_multiset/constexpr.cc
> > > > @@ -0,0 +1,239 @@
> > > > +// { dg-do run { target c++26 } }
> > >
> > > I'd expect constexpr tests to be compile-only.
> >
> > The tests have a main() function which calls VERIFY(test()), which
> > only has an effect at runtime.
> >
> > Either they should be dg-do run, or the main() function can be removed
> > and just keep:
> >
> > static_assert( test() );
> >
> > Do these new tests add any checks which are not already covered by
> > existing runtime tests for flat_set and flat_multiset?
> >
> > If they don't add anything new, then remove the main() function and
> > just do static_assert(test());
> >
>
> It turns out I misunderstood `target c++23`; I thought it would *only*
> test C++23, but it actually tests against both 23 and 26. I’ve merged
> the testcase and guarded it using __cplusplus > 202302L.
> Please take another look, thanks!

{ target c++23 } means it requires C++23 support, so should be skipped
for anything older. C++26 mode includes C++23 support, so

For any test which requires something newer than the default
(currently -std=gnu++20) it will be tested with the minimum required
version (so c++23 here) and also the maximum version that GCC supports
(so c++26 currently). So for flat_set tests, they'll all get run
twice, once for C++23 and once for C++26.

I'll take a look at the new patch later today.

Reply via email to