[gcc r16-8950] libstdc++: Fix recent std::flat_map test with COW std::string
Patrick Palka
ppalka@gcc.gnu.org
Thu May 21 22:36:56 GMT 2026
https://gcc.gnu.org/g:92f550b49b3ab4c9b7b06222d71b2f2c10843657
commit r16-8950-g92f550b49b3ab4c9b7b06222d71b2f2c10843657
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu May 21 18:35:55 2026 -0400
libstdc++: Fix recent std::flat_map test with COW std::string
... 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>
(cherry picked from commit ea57201777f8cb58766953f87880bcf89244411b)
Diff:
---
libstdc++-v3/testsuite/23_containers/flat_map/1.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libstdc++-v3/testsuite/23_containers/flat_map/1.cc b/libstdc++-v3/testsuite/23_containers/flat_map/1.cc
index 096b9eeac3e4..1cb088f511eb 100644
--- a/libstdc++-v3/testsuite/23_containers/flat_map/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/flat_map/1.cc
@@ -330,7 +330,9 @@ test_constexpr()
test07();
test08();
test09();
+#if __cpp_lib_constexpr_string >= 201907L
test10();
+#endif
return true;
}
More information about the Libstdc++-cvs
mailing list