]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix recent std::flat_map test with COW std::string
authorPatrick Palka <ppalka@redhat.com>
Thu, 21 May 2026 22:35:55 +0000 (18:35 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 21 May 2026 22:35:55 +0000 (18:35 -0400)
... which is not constexpr, so just disable constant evaluation of the
test in this case.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/flat_map/1.cc (test_constexpr):
If std::string isn't constexpr don't run test10.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/testsuite/23_containers/flat_map/1.cc

index 096b9eeac3e44a75591b42f0929e4ddf05555825..1cb088f511eba0140cb174c7cc9f63c7beef789c 100644 (file)
@@ -330,7 +330,9 @@ test_constexpr()
   test07();
   test08();
   test09();
+#if __cpp_lib_constexpr_string >= 201907L
   test10();
+#endif
   return true;
 }