libstdc++: Fix test FAIL for old std::string ABI
authorJonathan Wakely <jwakely@redhat.com>
Tue, 4 Oct 2022 16:23:45 +0000 (17:23 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 4 Oct 2022 16:43:00 +0000 (17:43 +0100)
libstdc++-v3/ChangeLog:

* testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused
<sstream header.
(test04): Remove constexpr for old std::string ABI and test at
runtime.

libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc

index efa350f..8b9c6c4 100644 (file)
@@ -3,8 +3,7 @@
 
 #include <ranges>
 #include <algorithm>
-#include <sstream>
-#include <string_view>
+#include <string>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 
@@ -73,7 +72,10 @@ test03()
   return true;
 }
 
-constexpr bool
+#if _GLIBCXX_USE_CXX11_ABI
+constexpr
+#endif
+bool
 test04()
 {
   std::string rs[] = {"a", "", "b", "", "c"};
@@ -93,5 +95,9 @@ main()
   static_assert(test01());
   static_assert(test02());
   static_assert(test03());
+#if _GLIBCXX_USE_CXX11_ABI
   static_assert(test04());
+#else
+  VERIFY(test04());
+#endif
 }