[libcxx-commits] [libcxx] ccc7403 - [libc++] Prepare string.ops for constexpr

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 11 13:31:41 PST 2022


Author: Nikolas Klauser
Date: 2022-02-11T22:31:32+01:00
New Revision: ccc740353d7d7ec221994612d1f27184f186e17c

URL: https://github.com/llvm/llvm-project/commit/ccc740353d7d7ec221994612d1f27184f186e17c
DIFF: https://github.com/llvm/llvm-project/commit/ccc740353d7d7ec221994612d1f27184f186e17c.diff

LOG: [libc++] Prepare string.ops for constexpr

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D119490

Added: 
    

Modified: 
    libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp
index ee7f4c4718af7..13a98fc314617 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s)
 {
     typedef typename S::traits_type T;
@@ -31,23 +31,32 @@ test(const S& s)
         assert(T::eq(str[0], typename S::value_type()));
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""));
     test(S("abcde"));
     test(S("abcdefghij"));
     test(S("abcdefghijklmnopqrst"));
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""));
     test(S("abcde"));
     test(S("abcdefghij"));
     test(S("abcdefghijklmnopqrst"));
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp
index 6aa07302a951d..cb28c53982a20 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp
@@ -18,7 +18,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test_const(const S& s)
 {
     typedef typename S::traits_type T;
@@ -33,7 +33,7 @@ test_const(const S& s)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test_nonconst(S& s)
 {
     typedef typename S::traits_type T;
@@ -47,32 +47,41 @@ test_nonconst(S& s)
         assert(T::eq(str[0], typename S::value_type()));
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test_const(S(""));
     test_const(S("abcde"));
     test_const(S("abcdefghij"));
     test_const(S("abcdefghijklmnopqrst"));
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test_const(S(""));
     test_const(S("abcde"));
     test_const(S("abcdefghij"));
     test_const(S("abcdefghijklmnopqrst"));
-    }
+  }
 #endif
 #if TEST_STD_VER > 14
-    {
+  {
     typedef std::string S;
     S s1("");                     test_nonconst(s1);
     S s2("abcde");                test_nonconst(s2);
     S s3("abcdefghij");           test_nonconst(s3);
     S s4("abcdefghijklmnopqrst"); test_nonconst(s4);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp
index 652e995e1c47f..9adad2a9fe632 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp
@@ -18,31 +18,40 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::allocator_type& a)
 {
     assert(s.get_allocator() == a);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef test_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
     test(S(""), A());
     test(S("abcde", A(1)), A(1));
     test(S("abcdefghij", A(2)), A(2));
     test(S("abcdefghijklmnopqrst", A(3)), A(3));
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
     test(S(""), A());
     test(S("abcde", A()), A());
     test(S("abcdefghij", A()), A());
     test(S("abcdefghijklmnopqrst", A()), A());
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
index 072f062fca750..316f64bd66f2d 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
@@ -16,7 +16,7 @@
 #include "test_macros.h"
 #include "min_allocator.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -26,16 +26,15 @@ int sign(int x)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, int x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
     assert(sign(s.compare(str)) == sign(x));
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), "", 0);
     test(S(""), "abcde", -5);
@@ -53,9 +52,9 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), "abcde", 15);
     test(S("abcdefghijklmnopqrst"), "abcdefghij", 10);
     test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", 0);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), "", 0);
     test(S(""), "abcde", -5);
@@ -73,7 +72,17 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), "abcde", 15);
     test(S("abcdefghijklmnopqrst"), "abcdefghij", 10);
     test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
index abab9879a14ea..81fc6ba5e5e21 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
@@ -80,7 +80,7 @@ test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1,
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 bool test0()
 {
     test(S(""), 0, 0, SV(""), 0, 0, 0);
     test(S(""), 0, 0, SV(""), 0, 1, 0);
@@ -182,10 +182,12 @@ void test0()
     test(S(""), 0, 1, SV("abcde"), 5, 0, 0);
     test(S(""), 0, 1, SV("abcde"), 5, 1, 0);
     test(S(""), 0, 1, SV("abcde"), 6, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 bool test1()
 {
     test(S(""), 0, 1, SV("abcdefghij"), 0, 0, 0);
     test(S(""), 0, 1, SV("abcdefghij"), 0, 1, -1);
@@ -287,10 +289,12 @@ void test1()
     test(S(""), 1, 0, SV("abcdefghij"), 11, 0, 0);
     test(S(""), 1, 0, SV("abcdefghijklmnopqrst"), 0, 0, 0);
     test(S(""), 1, 0, SV("abcdefghijklmnopqrst"), 0, 1, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test2()
+TEST_CONSTEXPR_CXX20 bool test2()
 {
     test(S(""), 1, 0, SV("abcdefghijklmnopqrst"), 0, 10, 0);
     test(S(""), 1, 0, SV("abcdefghijklmnopqrst"), 0, 19, 0);
@@ -392,10 +396,12 @@ void test2()
     test(S("abcde"), 0, 1, SV(""), 0, 1, 1);
     test(S("abcde"), 0, 1, SV(""), 1, 0, 0);
     test(S("abcde"), 0, 1, SV("abcde"), 0, 0, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test3()
+TEST_CONSTEXPR_CXX20 bool test3()
 {
     test(S("abcde"), 0, 1, SV("abcde"), 0, 1, 0);
     test(S("abcde"), 0, 1, SV("abcde"), 0, 2, -1);
@@ -497,10 +503,12 @@ void test3()
     test(S("abcde"), 0, 2, SV("abcdefghij"), 0, 1, 1);
     test(S("abcde"), 0, 2, SV("abcdefghij"), 0, 5, -3);
     test(S("abcde"), 0, 2, SV("abcdefghij"), 0, 9, -7);
+
+    return true;
 }
 
 template <class S, class SV>
-void test4()
+TEST_CONSTEXPR_CXX20 bool test4()
 {
     test(S("abcde"), 0, 2, SV("abcdefghij"), 0, 10, -8);
     test(S("abcde"), 0, 2, SV("abcdefghij"), 0, 11, -8);
@@ -602,10 +610,12 @@ void test4()
     test(S("abcde"), 0, 4, SV("abcdefghijklmnopqrst"), 0, 19, -15);
     test(S("abcde"), 0, 4, SV("abcdefghijklmnopqrst"), 0, 20, -16);
     test(S("abcde"), 0, 4, SV("abcdefghijklmnopqrst"), 0, 21, -16);
+
+    return true;
 }
 
 template <class S, class SV>
-void test5()
+TEST_CONSTEXPR_CXX20 bool test5()
 {
     test(S("abcde"), 0, 4, SV("abcdefghijklmnopqrst"), 1, 0, 4);
     test(S("abcde"), 0, 4, SV("abcdefghijklmnopqrst"), 1, 1, -1);
@@ -707,10 +717,12 @@ void test5()
     test(S("abcde"), 0, 6, SV("abcde"), 0, 2, 3);
     test(S("abcde"), 0, 6, SV("abcde"), 0, 4, 1);
     test(S("abcde"), 0, 6, SV("abcde"), 0, 5, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test6()
+TEST_CONSTEXPR_CXX20 bool test6()
 {
     test(S("abcde"), 0, 6, SV("abcde"), 0, 6, 0);
     test(S("abcde"), 0, 6, SV("abcde"), 1, 0, 5);
@@ -812,10 +824,12 @@ void test6()
     test(S("abcde"), 1, 0, SV("abcdefghij"), 0, 11, -10);
     test(S("abcde"), 1, 0, SV("abcdefghij"), 1, 0, 0);
     test(S("abcde"), 1, 0, SV("abcdefghij"), 1, 1, -1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test7()
+TEST_CONSTEXPR_CXX20 bool test7()
 {
     test(S("abcde"), 1, 0, SV("abcdefghij"), 1, 4, -4);
     test(S("abcde"), 1, 0, SV("abcdefghij"), 1, 8, -8);
@@ -917,10 +931,12 @@ void test7()
     test(S("abcde"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 1, 0);
     test(S("abcde"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 9, -8);
     test(S("abcde"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 18, -17);
+
+    return true;
 }
 
 template <class S, class SV>
-void test8()
+TEST_CONSTEXPR_CXX20 bool test8()
 {
     test(S("abcde"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 19, -18);
     test(S("abcde"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 20, -18);
@@ -1022,10 +1038,12 @@ void test8()
     test(S("abcde"), 1, 3, SV("abcde"), 1, 0, 3);
     test(S("abcde"), 1, 3, SV("abcde"), 1, 1, 2);
     test(S("abcde"), 1, 3, SV("abcde"), 1, 2, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test9()
+TEST_CONSTEXPR_CXX20 bool test9()
 {
     test(S("abcde"), 1, 3, SV("abcde"), 1, 3, 0);
     test(S("abcde"), 1, 3, SV("abcde"), 1, 4, -1);
@@ -1127,10 +1145,12 @@ void test9()
     test(S("abcde"), 1, 4, SV("abcdefghij"), 1, 8, -4);
     test(S("abcde"), 1, 4, SV("abcdefghij"), 1, 9, -5);
     test(S("abcde"), 1, 4, SV("abcdefghij"), 1, 10, -5);
+
+    return true;
 }
 
 template <class S, class SV>
-void test10()
+TEST_CONSTEXPR_CXX20 bool test10()
 {
     test(S("abcde"), 1, 4, SV("abcdefghij"), 5, 0, 4);
     test(S("abcde"), 1, 4, SV("abcdefghij"), 5, 1, -4);
@@ -1232,10 +1252,12 @@ void test10()
     test(S("abcde"), 1, 5, SV("abcdefghijklmnopqrst"), 1, 20, -15);
     test(S("abcde"), 1, 5, SV("abcdefghijklmnopqrst"), 10, 0, 4);
     test(S("abcde"), 1, 5, SV("abcdefghijklmnopqrst"), 10, 1, -9);
+
+    return true;
 }
 
 template <class S, class SV>
-void test11()
+TEST_CONSTEXPR_CXX20 bool test11()
 {
     test(S("abcde"), 1, 5, SV("abcdefghijklmnopqrst"), 10, 5, -9);
     test(S("abcde"), 1, 5, SV("abcdefghijklmnopqrst"), 10, 9, -9);
@@ -1337,10 +1359,12 @@ void test11()
     test(S("abcde"), 2, 1, SV("abcde"), 1, 4, 1);
     test(S("abcde"), 2, 1, SV("abcde"), 1, 5, 1);
     test(S("abcde"), 2, 1, SV("abcde"), 2, 0, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test12()
+TEST_CONSTEXPR_CXX20 bool test12()
 {
     test(S("abcde"), 2, 1, SV("abcde"), 2, 1, 0);
     test(S("abcde"), 2, 1, SV("abcde"), 2, 2, -1);
@@ -1442,10 +1466,12 @@ void test12()
     test(S("abcde"), 2, 2, SV("abcdefghij"), 5, 1, -3);
     test(S("abcde"), 2, 2, SV("abcdefghij"), 5, 2, -3);
     test(S("abcde"), 2, 2, SV("abcdefghij"), 5, 4, -3);
+
+    return true;
 }
 
 template <class S, class SV>
-void test13()
+TEST_CONSTEXPR_CXX20 bool test13()
 {
     test(S("abcde"), 2, 2, SV("abcdefghij"), 5, 5, -3);
     test(S("abcde"), 2, 2, SV("abcdefghij"), 5, 6, -3);
@@ -1547,10 +1573,12 @@ void test13()
     test(S("abcde"), 2, 3, SV("abcdefghijklmnopqrst"), 10, 9, -8);
     test(S("abcde"), 2, 3, SV("abcdefghijklmnopqrst"), 10, 10, -8);
     test(S("abcde"), 2, 3, SV("abcdefghijklmnopqrst"), 10, 11, -8);
+
+    return true;
 }
 
 template <class S, class SV>
-void test14()
+TEST_CONSTEXPR_CXX20 bool test14()
 {
     test(S("abcde"), 2, 3, SV("abcdefghijklmnopqrst"), 19, 0, 3);
     test(S("abcde"), 2, 3, SV("abcdefghijklmnopqrst"), 19, 1, -17);
@@ -1652,10 +1680,12 @@ void test14()
     test(S("abcde"), 4, 0, SV("abcde"), 2, 2, -2);
     test(S("abcde"), 4, 0, SV("abcde"), 2, 3, -3);
     test(S("abcde"), 4, 0, SV("abcde"), 2, 4, -3);
+
+    return true;
 }
 
 template <class S, class SV>
-void test15()
+TEST_CONSTEXPR_CXX20 bool test15()
 {
     test(S("abcde"), 4, 0, SV("abcde"), 4, 0, 0);
     test(S("abcde"), 4, 0, SV("abcde"), 4, 1, -1);
@@ -1757,10 +1787,12 @@ void test15()
     test(S("abcde"), 4, 1, SV("abcdefghij"), 5, 6, -1);
     test(S("abcde"), 4, 1, SV("abcdefghij"), 9, 0, 1);
     test(S("abcde"), 4, 1, SV("abcdefghij"), 9, 1, -5);
+
+    return true;
 }
 
 template <class S, class SV>
-void test16()
+TEST_CONSTEXPR_CXX20 bool test16()
 {
     test(S("abcde"), 4, 1, SV("abcdefghij"), 9, 2, -5);
     test(S("abcde"), 4, 1, SV("abcdefghij"), 10, 0, 1);
@@ -1862,10 +1894,12 @@ void test16()
     test(S("abcde"), 4, 2, SV("abcdefghijklmnopqrst"), 19, 1, -15);
     test(S("abcde"), 4, 2, SV("abcdefghijklmnopqrst"), 19, 2, -15);
     test(S("abcde"), 4, 2, SV("abcdefghijklmnopqrst"), 20, 0, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test17()
+TEST_CONSTEXPR_CXX20 bool test17()
 {
     test(S("abcde"), 4, 2, SV("abcdefghijklmnopqrst"), 20, 1, 1);
     test(S("abcde"), 4, 2, SV("abcdefghijklmnopqrst"), 21, 0, 0);
@@ -1967,10 +2001,12 @@ void test17()
     test(S("abcde"), 5, 1, SV("abcde"), 4, 1, -1);
     test(S("abcde"), 5, 1, SV("abcde"), 4, 2, -1);
     test(S("abcde"), 5, 1, SV("abcde"), 5, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test18()
+TEST_CONSTEXPR_CXX20 bool test18()
 {
     test(S("abcde"), 5, 1, SV("abcde"), 5, 1, 0);
     test(S("abcde"), 5, 1, SV("abcde"), 6, 0, 0);
@@ -2072,10 +2108,12 @@ void test18()
     test(S("abcde"), 6, 0, SV("abcdefghij"), 10, 0, 0);
     test(S("abcde"), 6, 0, SV("abcdefghij"), 10, 1, 0);
     test(S("abcde"), 6, 0, SV("abcdefghij"), 11, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test19()
+TEST_CONSTEXPR_CXX20 bool test19()
 {
     test(S("abcde"), 6, 0, SV("abcdefghijklmnopqrst"), 0, 0, 0);
     test(S("abcde"), 6, 0, SV("abcdefghijklmnopqrst"), 0, 1, 0);
@@ -2177,10 +2215,12 @@ void test19()
     test(S("abcdefghij"), 0, 0, SV("abcdefghijklmnopqrst"), 21, 0, 0);
     test(S("abcdefghij"), 0, 1, SV(""), 0, 0, 1);
     test(S("abcdefghij"), 0, 1, SV(""), 0, 1, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test20()
+TEST_CONSTEXPR_CXX20 bool test20()
 {
     test(S("abcdefghij"), 0, 1, SV(""), 1, 0, 0);
     test(S("abcdefghij"), 0, 1, SV("abcde"), 0, 0, 1);
@@ -2282,10 +2322,12 @@ void test20()
     test(S("abcdefghij"), 0, 5, SV("abcde"), 6, 0, 0);
     test(S("abcdefghij"), 0, 5, SV("abcdefghij"), 0, 0, 5);
     test(S("abcdefghij"), 0, 5, SV("abcdefghij"), 0, 1, 4);
+
+    return true;
 }
 
 template <class S, class SV>
-void test21()
+TEST_CONSTEXPR_CXX20 bool test21()
 {
     test(S("abcdefghij"), 0, 5, SV("abcdefghij"), 0, 5, 0);
     test(S("abcdefghij"), 0, 5, SV("abcdefghij"), 0, 9, -4);
@@ -2387,10 +2429,12 @@ void test21()
     test(S("abcdefghij"), 0, 9, SV("abcdefghijklmnopqrst"), 0, 1, 8);
     test(S("abcdefghij"), 0, 9, SV("abcdefghijklmnopqrst"), 0, 10, -1);
     test(S("abcdefghij"), 0, 9, SV("abcdefghijklmnopqrst"), 0, 19, -10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test22()
+TEST_CONSTEXPR_CXX20 bool test22()
 {
     test(S("abcdefghij"), 0, 9, SV("abcdefghijklmnopqrst"), 0, 20, -11);
     test(S("abcdefghij"), 0, 9, SV("abcdefghijklmnopqrst"), 0, 21, -11);
@@ -2492,10 +2536,12 @@ void test22()
     test(S("abcdefghij"), 0, 11, SV("abcde"), 0, 0, 10);
     test(S("abcdefghij"), 0, 11, SV("abcde"), 0, 1, 9);
     test(S("abcdefghij"), 0, 11, SV("abcde"), 0, 2, 8);
+
+    return true;
 }
 
 template <class S, class SV>
-void test23()
+TEST_CONSTEXPR_CXX20 bool test23()
 {
     test(S("abcdefghij"), 0, 11, SV("abcde"), 0, 4, 6);
     test(S("abcdefghij"), 0, 11, SV("abcde"), 0, 5, 5);
@@ -2597,10 +2643,12 @@ void test23()
     test(S("abcdefghij"), 1, 0, SV("abcdefghij"), 0, 9, -9);
     test(S("abcdefghij"), 1, 0, SV("abcdefghij"), 0, 10, -10);
     test(S("abcdefghij"), 1, 0, SV("abcdefghij"), 0, 11, -10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test24()
+TEST_CONSTEXPR_CXX20 bool test24()
 {
     test(S("abcdefghij"), 1, 0, SV("abcdefghij"), 1, 0, 0);
     test(S("abcdefghij"), 1, 0, SV("abcdefghij"), 1, 1, -1);
@@ -2702,10 +2750,12 @@ void test24()
     test(S("abcdefghij"), 1, 1, SV("abcdefghijklmnopqrst"), 0, 21, 1);
     test(S("abcdefghij"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 0, 1);
     test(S("abcdefghij"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 1, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test25()
+TEST_CONSTEXPR_CXX20 bool test25()
 {
     test(S("abcdefghij"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 9, -8);
     test(S("abcdefghij"), 1, 1, SV("abcdefghijklmnopqrst"), 1, 18, -17);
@@ -2807,10 +2857,12 @@ void test25()
     test(S("abcdefghij"), 1, 8, SV("abcde"), 0, 5, 1);
     test(S("abcdefghij"), 1, 8, SV("abcde"), 0, 6, 1);
     test(S("abcdefghij"), 1, 8, SV("abcde"), 1, 0, 8);
+
+    return true;
 }
 
 template <class S, class SV>
-void test26()
+TEST_CONSTEXPR_CXX20 bool test26()
 {
     test(S("abcdefghij"), 1, 8, SV("abcde"), 1, 1, 7);
     test(S("abcdefghij"), 1, 8, SV("abcde"), 1, 2, 6);
@@ -2912,10 +2964,12 @@ void test26()
     test(S("abcdefghij"), 1, 9, SV("abcdefghij"), 1, 1, 8);
     test(S("abcdefghij"), 1, 9, SV("abcdefghij"), 1, 4, 5);
     test(S("abcdefghij"), 1, 9, SV("abcdefghij"), 1, 8, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test27()
+TEST_CONSTEXPR_CXX20 bool test27()
 {
     test(S("abcdefghij"), 1, 9, SV("abcdefghij"), 1, 9, 0);
     test(S("abcdefghij"), 1, 9, SV("abcdefghij"), 1, 10, 0);
@@ -3017,10 +3071,12 @@ void test27()
     test(S("abcdefghij"), 1, 10, SV("abcdefghijklmnopqrst"), 1, 18, -9);
     test(S("abcdefghij"), 1, 10, SV("abcdefghijklmnopqrst"), 1, 19, -10);
     test(S("abcdefghij"), 1, 10, SV("abcdefghijklmnopqrst"), 1, 20, -10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test28()
+TEST_CONSTEXPR_CXX20 bool test28()
 {
     test(S("abcdefghij"), 1, 10, SV("abcdefghijklmnopqrst"), 10, 0, 9);
     test(S("abcdefghij"), 1, 10, SV("abcdefghijklmnopqrst"), 10, 1, -9);
@@ -3122,10 +3178,12 @@ void test28()
     test(S("abcdefghij"), 5, 1, SV("abcde"), 1, 2, 4);
     test(S("abcdefghij"), 5, 1, SV("abcde"), 1, 3, 4);
     test(S("abcdefghij"), 5, 1, SV("abcde"), 1, 4, 4);
+
+    return true;
 }
 
 template <class S, class SV>
-void test29()
+TEST_CONSTEXPR_CXX20 bool test29()
 {
     test(S("abcdefghij"), 5, 1, SV("abcde"), 1, 5, 4);
     test(S("abcdefghij"), 5, 1, SV("abcde"), 2, 0, 1);
@@ -3227,10 +3285,12 @@ void test29()
     test(S("abcdefghij"), 5, 2, SV("abcdefghij"), 1, 10, 4);
     test(S("abcdefghij"), 5, 2, SV("abcdefghij"), 5, 0, 2);
     test(S("abcdefghij"), 5, 2, SV("abcdefghij"), 5, 1, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test30()
+TEST_CONSTEXPR_CXX20 bool test30()
 {
     test(S("abcdefghij"), 5, 2, SV("abcdefghij"), 5, 2, 0);
     test(S("abcdefghij"), 5, 2, SV("abcdefghij"), 5, 4, -2);
@@ -3332,10 +3392,12 @@ void test30()
     test(S("abcdefghij"), 5, 4, SV("abcdefghijklmnopqrst"), 10, 1, -5);
     test(S("abcdefghij"), 5, 4, SV("abcdefghijklmnopqrst"), 10, 5, -5);
     test(S("abcdefghij"), 5, 4, SV("abcdefghijklmnopqrst"), 10, 9, -5);
+
+    return true;
 }
 
 template <class S, class SV>
-void test31()
+TEST_CONSTEXPR_CXX20 bool test31()
 {
     test(S("abcdefghij"), 5, 4, SV("abcdefghijklmnopqrst"), 10, 10, -5);
     test(S("abcdefghij"), 5, 4, SV("abcdefghijklmnopqrst"), 10, 11, -5);
@@ -3437,10 +3499,12 @@ void test31()
     test(S("abcdefghij"), 5, 6, SV("abcde"), 2, 0, 5);
     test(S("abcdefghij"), 5, 6, SV("abcde"), 2, 1, 3);
     test(S("abcdefghij"), 5, 6, SV("abcde"), 2, 2, 3);
+
+    return true;
 }
 
 template <class S, class SV>
-void test32()
+TEST_CONSTEXPR_CXX20 bool test32()
 {
     test(S("abcdefghij"), 5, 6, SV("abcde"), 2, 3, 3);
     test(S("abcdefghij"), 5, 6, SV("abcde"), 2, 4, 3);
@@ -3542,10 +3606,12 @@ void test32()
     test(S("abcdefghij"), 9, 0, SV("abcdefghij"), 5, 4, -4);
     test(S("abcdefghij"), 9, 0, SV("abcdefghij"), 5, 5, -5);
     test(S("abcdefghij"), 9, 0, SV("abcdefghij"), 5, 6, -5);
+
+    return true;
 }
 
 template <class S, class SV>
-void test33()
+TEST_CONSTEXPR_CXX20 bool test33()
 {
     test(S("abcdefghij"), 9, 0, SV("abcdefghij"), 9, 0, 0);
     test(S("abcdefghij"), 9, 0, SV("abcdefghij"), 9, 1, -1);
@@ -3647,10 +3713,12 @@ void test33()
     test(S("abcdefghij"), 9, 1, SV("abcdefghijklmnopqrst"), 10, 11, -1);
     test(S("abcdefghij"), 9, 1, SV("abcdefghijklmnopqrst"), 19, 0, 1);
     test(S("abcdefghij"), 9, 1, SV("abcdefghijklmnopqrst"), 19, 1, -10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test34()
+TEST_CONSTEXPR_CXX20 bool test34()
 {
     test(S("abcdefghij"), 9, 1, SV("abcdefghijklmnopqrst"), 19, 2, -10);
     test(S("abcdefghij"), 9, 1, SV("abcdefghijklmnopqrst"), 20, 0, 1);
@@ -3752,10 +3820,12 @@ void test34()
     test(S("abcdefghij"), 10, 0, SV("abcde"), 2, 4, -3);
     test(S("abcdefghij"), 10, 0, SV("abcde"), 4, 0, 0);
     test(S("abcdefghij"), 10, 0, SV("abcde"), 4, 1, -1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test35()
+TEST_CONSTEXPR_CXX20 bool test35()
 {
     test(S("abcdefghij"), 10, 0, SV("abcde"), 4, 2, -1);
     test(S("abcdefghij"), 10, 0, SV("abcde"), 5, 0, 0);
@@ -3857,10 +3927,12 @@ void test35()
     test(S("abcdefghij"), 10, 1, SV("abcdefghij"), 9, 1, -1);
     test(S("abcdefghij"), 10, 1, SV("abcdefghij"), 9, 2, -1);
     test(S("abcdefghij"), 10, 1, SV("abcdefghij"), 10, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test36()
+TEST_CONSTEXPR_CXX20 bool test36()
 {
     test(S("abcdefghij"), 10, 1, SV("abcdefghij"), 10, 1, 0);
     test(S("abcdefghij"), 10, 1, SV("abcdefghij"), 11, 0, 0);
@@ -3962,10 +4034,12 @@ void test36()
     test(S("abcdefghij"), 11, 0, SV("abcdefghijklmnopqrst"), 20, 0, 0);
     test(S("abcdefghij"), 11, 0, SV("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghij"), 11, 0, SV("abcdefghijklmnopqrst"), 21, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test37()
+TEST_CONSTEXPR_CXX20 bool test37()
 {
     test(S("abcdefghijklmnopqrst"), 0, 0, SV(""), 0, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 0, SV(""), 0, 1, 0);
@@ -4067,10 +4141,12 @@ void test37()
     test(S("abcdefghijklmnopqrst"), 0, 1, SV("abcde"), 5, 0, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, SV("abcde"), 5, 1, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, SV("abcde"), 6, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test38()
+TEST_CONSTEXPR_CXX20 bool test38()
 {
     test(S("abcdefghijklmnopqrst"), 0, 1, SV("abcdefghij"), 0, 0, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, SV("abcdefghij"), 0, 1, 0);
@@ -4172,10 +4248,12 @@ void test38()
     test(S("abcdefghijklmnopqrst"), 0, 10, SV("abcdefghij"), 11, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 10, SV("abcdefghijklmnopqrst"), 0, 0, 10);
     test(S("abcdefghijklmnopqrst"), 0, 10, SV("abcdefghijklmnopqrst"), 0, 1, 9);
+
+    return true;
 }
 
 template <class S, class SV>
-void test39()
+TEST_CONSTEXPR_CXX20 bool test39()
 {
     test(S("abcdefghijklmnopqrst"), 0, 10, SV("abcdefghijklmnopqrst"), 0, 10, 0);
     test(S("abcdefghijklmnopqrst"), 0, 10, SV("abcdefghijklmnopqrst"), 0, 19, -9);
@@ -4277,10 +4355,12 @@ void test39()
     test(S("abcdefghijklmnopqrst"), 0, 20, SV(""), 0, 1, 20);
     test(S("abcdefghijklmnopqrst"), 0, 20, SV(""), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 20, SV("abcde"), 0, 0, 20);
+
+    return true;
 }
 
 template <class S, class SV>
-void test40()
+TEST_CONSTEXPR_CXX20 bool test40()
 {
     test(S("abcdefghijklmnopqrst"), 0, 20, SV("abcde"), 0, 1, 19);
     test(S("abcdefghijklmnopqrst"), 0, 20, SV("abcde"), 0, 2, 18);
@@ -4382,10 +4462,12 @@ void test40()
     test(S("abcdefghijklmnopqrst"), 0, 21, SV("abcdefghij"), 0, 1, 19);
     test(S("abcdefghijklmnopqrst"), 0, 21, SV("abcdefghij"), 0, 5, 15);
     test(S("abcdefghijklmnopqrst"), 0, 21, SV("abcdefghij"), 0, 9, 11);
+
+    return true;
 }
 
 template <class S, class SV>
-void test41()
+TEST_CONSTEXPR_CXX20 bool test41()
 {
     test(S("abcdefghijklmnopqrst"), 0, 21, SV("abcdefghij"), 0, 10, 10);
     test(S("abcdefghijklmnopqrst"), 0, 21, SV("abcdefghij"), 0, 11, 10);
@@ -4487,10 +4569,12 @@ void test41()
     test(S("abcdefghijklmnopqrst"), 1, 0, SV("abcdefghijklmnopqrst"), 0, 19, -19);
     test(S("abcdefghijklmnopqrst"), 1, 0, SV("abcdefghijklmnopqrst"), 0, 20, -20);
     test(S("abcdefghijklmnopqrst"), 1, 0, SV("abcdefghijklmnopqrst"), 0, 21, -20);
+
+    return true;
 }
 
 template <class S, class SV>
-void test42()
+TEST_CONSTEXPR_CXX20 bool test42()
 {
     test(S("abcdefghijklmnopqrst"), 1, 0, SV("abcdefghijklmnopqrst"), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 1, 0, SV("abcdefghijklmnopqrst"), 1, 1, -1);
@@ -4592,10 +4676,12 @@ void test42()
     test(S("abcdefghijklmnopqrst"), 1, 9, SV("abcde"), 0, 2, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, SV("abcde"), 0, 4, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, SV("abcde"), 0, 5, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test43()
+TEST_CONSTEXPR_CXX20 bool test43()
 {
     test(S("abcdefghijklmnopqrst"), 1, 9, SV("abcde"), 0, 6, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, SV("abcde"), 1, 0, 9);
@@ -4697,10 +4783,12 @@ void test43()
     test(S("abcdefghijklmnopqrst"), 1, 18, SV("abcdefghij"), 0, 11, 1);
     test(S("abcdefghijklmnopqrst"), 1, 18, SV("abcdefghij"), 1, 0, 18);
     test(S("abcdefghijklmnopqrst"), 1, 18, SV("abcdefghij"), 1, 1, 17);
+
+    return true;
 }
 
 template <class S, class SV>
-void test44()
+TEST_CONSTEXPR_CXX20 bool test44()
 {
     test(S("abcdefghijklmnopqrst"), 1, 18, SV("abcdefghij"), 1, 4, 14);
     test(S("abcdefghijklmnopqrst"), 1, 18, SV("abcdefghij"), 1, 8, 10);
@@ -4802,10 +4890,12 @@ void test44()
     test(S("abcdefghijklmnopqrst"), 1, 19, SV("abcdefghijklmnopqrst"), 1, 1, 18);
     test(S("abcdefghijklmnopqrst"), 1, 19, SV("abcdefghijklmnopqrst"), 1, 9, 10);
     test(S("abcdefghijklmnopqrst"), 1, 19, SV("abcdefghijklmnopqrst"), 1, 18, 1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test45()
+TEST_CONSTEXPR_CXX20 bool test45()
 {
     test(S("abcdefghijklmnopqrst"), 1, 19, SV("abcdefghijklmnopqrst"), 1, 19, 0);
     test(S("abcdefghijklmnopqrst"), 1, 19, SV("abcdefghijklmnopqrst"), 1, 20, 0);
@@ -4907,10 +4997,12 @@ void test45()
     test(S("abcdefghijklmnopqrst"), 10, 0, SV("abcde"), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 10, 0, SV("abcde"), 1, 1, -1);
     test(S("abcdefghijklmnopqrst"), 10, 0, SV("abcde"), 1, 2, -2);
+
+    return true;
 }
 
 template <class S, class SV>
-void test46()
+TEST_CONSTEXPR_CXX20 bool test46()
 {
     test(S("abcdefghijklmnopqrst"), 10, 0, SV("abcde"), 1, 3, -3);
     test(S("abcdefghijklmnopqrst"), 10, 0, SV("abcde"), 1, 4, -4);
@@ -5012,10 +5104,12 @@ void test46()
     test(S("abcdefghijklmnopqrst"), 10, 1, SV("abcdefghij"), 1, 8, 9);
     test(S("abcdefghijklmnopqrst"), 10, 1, SV("abcdefghij"), 1, 9, 9);
     test(S("abcdefghijklmnopqrst"), 10, 1, SV("abcdefghij"), 1, 10, 9);
+
+    return true;
 }
 
 template <class S, class SV>
-void test47()
+TEST_CONSTEXPR_CXX20 bool test47()
 {
     test(S("abcdefghijklmnopqrst"), 10, 1, SV("abcdefghij"), 5, 0, 1);
     test(S("abcdefghijklmnopqrst"), 10, 1, SV("abcdefghij"), 5, 1, 5);
@@ -5117,10 +5211,12 @@ void test47()
     test(S("abcdefghijklmnopqrst"), 10, 5, SV("abcdefghijklmnopqrst"), 1, 20, 9);
     test(S("abcdefghijklmnopqrst"), 10, 5, SV("abcdefghijklmnopqrst"), 10, 0, 5);
     test(S("abcdefghijklmnopqrst"), 10, 5, SV("abcdefghijklmnopqrst"), 10, 1, 4);
+
+    return true;
 }
 
 template <class S, class SV>
-void test48()
+TEST_CONSTEXPR_CXX20 bool test48()
 {
     test(S("abcdefghijklmnopqrst"), 10, 5, SV("abcdefghijklmnopqrst"), 10, 5, 0);
     test(S("abcdefghijklmnopqrst"), 10, 5, SV("abcdefghijklmnopqrst"), 10, 9, -4);
@@ -5222,10 +5318,12 @@ void test48()
     test(S("abcdefghijklmnopqrst"), 10, 10, SV("abcde"), 1, 4, 9);
     test(S("abcdefghijklmnopqrst"), 10, 10, SV("abcde"), 1, 5, 9);
     test(S("abcdefghijklmnopqrst"), 10, 10, SV("abcde"), 2, 0, 10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test49()
+TEST_CONSTEXPR_CXX20 bool test49()
 {
     test(S("abcdefghijklmnopqrst"), 10, 10, SV("abcde"), 2, 1, 8);
     test(S("abcdefghijklmnopqrst"), 10, 10, SV("abcde"), 2, 2, 8);
@@ -5327,10 +5425,12 @@ void test49()
     test(S("abcdefghijklmnopqrst"), 10, 11, SV("abcdefghij"), 5, 1, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, SV("abcdefghij"), 5, 2, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, SV("abcdefghij"), 5, 4, 5);
+
+    return true;
 }
 
 template <class S, class SV>
-void test50()
+TEST_CONSTEXPR_CXX20 bool test50()
 {
     test(S("abcdefghijklmnopqrst"), 10, 11, SV("abcdefghij"), 5, 5, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, SV("abcdefghij"), 5, 6, 5);
@@ -5432,10 +5532,12 @@ void test50()
     test(S("abcdefghijklmnopqrst"), 19, 0, SV("abcdefghijklmnopqrst"), 10, 9, -9);
     test(S("abcdefghijklmnopqrst"), 19, 0, SV("abcdefghijklmnopqrst"), 10, 10, -10);
     test(S("abcdefghijklmnopqrst"), 19, 0, SV("abcdefghijklmnopqrst"), 10, 11, -10);
+
+    return true;
 }
 
 template <class S, class SV>
-void test51()
+TEST_CONSTEXPR_CXX20 bool test51()
 {
     test(S("abcdefghijklmnopqrst"), 19, 0, SV("abcdefghijklmnopqrst"), 19, 0, 0);
     test(S("abcdefghijklmnopqrst"), 19, 0, SV("abcdefghijklmnopqrst"), 19, 1, -1);
@@ -5537,10 +5639,12 @@ void test51()
     test(S("abcdefghijklmnopqrst"), 19, 2, SV("abcde"), 2, 2, 17);
     test(S("abcdefghijklmnopqrst"), 19, 2, SV("abcde"), 2, 3, 17);
     test(S("abcdefghijklmnopqrst"), 19, 2, SV("abcde"), 2, 4, 17);
+
+    return true;
 }
 
 template <class S, class SV>
-void test52()
+TEST_CONSTEXPR_CXX20 bool test52()
 {
     test(S("abcdefghijklmnopqrst"), 19, 2, SV("abcde"), 4, 0, 1);
     test(S("abcdefghijklmnopqrst"), 19, 2, SV("abcde"), 4, 1, 15);
@@ -5642,10 +5746,12 @@ void test52()
     test(S("abcdefghijklmnopqrst"), 20, 0, SV("abcdefghij"), 5, 6, -5);
     test(S("abcdefghijklmnopqrst"), 20, 0, SV("abcdefghij"), 9, 0, 0);
     test(S("abcdefghijklmnopqrst"), 20, 0, SV("abcdefghij"), 9, 1, -1);
+
+    return true;
 }
 
 template <class S, class SV>
-void test53()
+TEST_CONSTEXPR_CXX20 bool test53()
 {
     test(S("abcdefghijklmnopqrst"), 20, 0, SV("abcdefghij"), 9, 2, -1);
     test(S("abcdefghijklmnopqrst"), 20, 0, SV("abcdefghij"), 10, 0, 0);
@@ -5747,10 +5853,12 @@ void test53()
     test(S("abcdefghijklmnopqrst"), 20, 1, SV("abcdefghijklmnopqrst"), 19, 1, -1);
     test(S("abcdefghijklmnopqrst"), 20, 1, SV("abcdefghijklmnopqrst"), 19, 2, -1);
     test(S("abcdefghijklmnopqrst"), 20, 1, SV("abcdefghijklmnopqrst"), 20, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test54()
+TEST_CONSTEXPR_CXX20 bool test54()
 {
     test(S("abcdefghijklmnopqrst"), 20, 1, SV("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghijklmnopqrst"), 20, 1, SV("abcdefghijklmnopqrst"), 21, 0, 0);
@@ -5828,16 +5936,20 @@ void test54()
     test(S("abcdefghijklmnopqrst"), 21, 0, SV("abcdefghijklmnopqrst"), 20, 0, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, SV("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, SV("abcdefghijklmnopqrst"), 21, 0, 0);
+
+    return true;
 }
 
 template <class S, class SV>
-void test55()
+TEST_CONSTEXPR_CXX20 bool test55()
 {
     test_npos(S(""), 0, 0, SV(""), 0, 0);
     test_npos(S(""), 0, 0, SV("abcde"), 0, -5);
     test_npos(S("abcde"), 0, 0, SV("abcdefghij"), 0, -10);
     test_npos(S("abcde"), 0, 0, SV("abcdefghij"), 1, -9);
     test_npos(S("abcde"), 0, 0, SV("abcdefghij"), 5, -5);
+
+    return true;
 }
 
 int main(int, char**)

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
index 4e77fc09c8e41..c5720f4b85ae3 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
@@ -18,7 +18,7 @@
 
 #include "test_macros.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -28,7 +28,7 @@ int sign(int x)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::size_type pos1, typename S::size_type n1,
      const typename S::value_type* str, int x)
 {
@@ -361,21 +361,30 @@ void test2()
     test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
index 75efbadcc8115..7c1512af339bd 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
@@ -18,7 +18,7 @@
 
 #include "test_macros.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -28,7 +28,7 @@ int sign(int x)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::size_type pos, typename S::size_type n1,
      const typename S::value_type* str, typename S::size_type n2, int x)
 {
@@ -51,7 +51,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n1,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 bool test0()
 {
     test(S(""), 0, 0, "", 0, 0);
     test(S(""), 0, 0, "abcde", 0, 0);
@@ -153,10 +153,12 @@ void test0()
     test(S("abcde"), 0, 4, "abcde", 0, 4);
     test(S("abcde"), 0, 4, "abcde", 1, 3);
     test(S("abcde"), 0, 4, "abcde", 2, 2);
+
+    return true;
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 bool test1()
 {
     test(S("abcde"), 0, 4, "abcde", 4, 0);
     test(S("abcde"), 0, 4, "abcde", 5, -1);
@@ -258,10 +260,12 @@ void test1()
     test(S("abcde"), 1, 3, "abcde", 5, 1);
     test(S("abcde"), 1, 3, "abcdefghij", 0, 3);
     test(S("abcde"), 1, 3, "abcdefghij", 1, 1);
+
+    return true;
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 bool test2()
 {
     test(S("abcde"), 1, 3, "abcdefghij", 5, 1);
     test(S("abcde"), 1, 3, "abcdefghij", 9, 1);
@@ -363,10 +367,12 @@ void test2()
     test(S("abcde"), 2, 3, "abcdefghij", 9, 2);
     test(S("abcde"), 2, 3, "abcdefghij", 10, 2);
     test(S("abcde"), 2, 3, "abcdefghijklmnopqrst", 0, 3);
+
+    return true;
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 bool test3()
 {
     test(S("abcde"), 2, 3, "abcdefghijklmnopqrst", 1, 2);
     test(S("abcde"), 2, 3, "abcdefghijklmnopqrst", 10, 2);
@@ -468,10 +474,12 @@ void test3()
     test(S("abcde"), 5, 1, "abcdefghijklmnopqrst", 10, -10);
     test(S("abcde"), 5, 1, "abcdefghijklmnopqrst", 19, -19);
     test(S("abcde"), 5, 1, "abcdefghijklmnopqrst", 20, -20);
+
+    return true;
 }
 
 template <class S>
-void test4()
+TEST_CONSTEXPR_CXX20 bool test4()
 {
     test(S("abcde"), 6, 0, "", 0, 0);
     test(S("abcde"), 6, 0, "abcde", 0, 0);
@@ -573,10 +581,12 @@ void test4()
     test(S("abcdefghij"), 0, 11, "abcde", 0, 10);
     test(S("abcdefghij"), 0, 11, "abcde", 1, 9);
     test(S("abcdefghij"), 0, 11, "abcde", 2, 8);
+
+    return true;
 }
 
 template <class S>
-void test5()
+TEST_CONSTEXPR_CXX20 bool test5()
 {
     test(S("abcdefghij"), 0, 11, "abcde", 4, 6);
     test(S("abcdefghij"), 0, 11, "abcde", 5, 5);
@@ -678,10 +688,12 @@ void test5()
     test(S("abcdefghij"), 1, 10, "abcde", 5, 1);
     test(S("abcdefghij"), 1, 10, "abcdefghij", 0, 9);
     test(S("abcdefghij"), 1, 10, "abcdefghij", 1, 1);
+
+    return true;
 }
 
 template <class S>
-void test6()
+TEST_CONSTEXPR_CXX20 bool test6()
 {
     test(S("abcdefghij"), 1, 10, "abcdefghij", 5, 1);
     test(S("abcdefghij"), 1, 10, "abcdefghij", 9, 1);
@@ -783,10 +795,12 @@ void test6()
     test(S("abcdefghij"), 5, 6, "abcdefghij", 9, 5);
     test(S("abcdefghij"), 5, 6, "abcdefghij", 10, 5);
     test(S("abcdefghij"), 5, 6, "abcdefghijklmnopqrst", 0, 5);
+
+    return true;
 }
 
 template <class S>
-void test7()
+TEST_CONSTEXPR_CXX20 bool test7()
 {
     test(S("abcdefghij"), 5, 6, "abcdefghijklmnopqrst", 1, 5);
     test(S("abcdefghij"), 5, 6, "abcdefghijklmnopqrst", 10, 5);
@@ -888,10 +902,12 @@ void test7()
     test(S("abcdefghij"), 11, 0, "abcdefghijklmnopqrst", 10, 0);
     test(S("abcdefghij"), 11, 0, "abcdefghijklmnopqrst", 19, 0);
     test(S("abcdefghij"), 11, 0, "abcdefghijklmnopqrst", 20, 0);
+
+    return true;
 }
 
 template <class S>
-void test8()
+TEST_CONSTEXPR_CXX20 bool test8()
 {
     test(S("abcdefghijklmnopqrst"), 0, 0, "", 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 0, "abcde", 0, 0);
@@ -993,10 +1009,12 @@ void test8()
     test(S("abcdefghijklmnopqrst"), 1, 0, "abcde", 0, 0);
     test(S("abcdefghijklmnopqrst"), 1, 0, "abcde", 1, -1);
     test(S("abcdefghijklmnopqrst"), 1, 0, "abcde", 2, -2);
+
+    return true;
 }
 
 template <class S>
-void test9()
+TEST_CONSTEXPR_CXX20 bool test9()
 {
     test(S("abcdefghijklmnopqrst"), 1, 0, "abcde", 4, -4);
     test(S("abcdefghijklmnopqrst"), 1, 0, "abcde", 5, -5);
@@ -1098,10 +1116,12 @@ void test9()
     test(S("abcdefghijklmnopqrst"), 10, 0, "abcde", 5, -5);
     test(S("abcdefghijklmnopqrst"), 10, 0, "abcdefghij", 0, 0);
     test(S("abcdefghijklmnopqrst"), 10, 0, "abcdefghij", 1, -1);
+
+    return true;
 }
 
 template <class S>
-void test10()
+TEST_CONSTEXPR_CXX20 bool test10()
 {
     test(S("abcdefghijklmnopqrst"), 10, 0, "abcdefghij", 5, -5);
     test(S("abcdefghijklmnopqrst"), 10, 0, "abcdefghij", 9, -9);
@@ -1203,10 +1223,12 @@ void test10()
     test(S("abcdefghijklmnopqrst"), 19, 0, "abcdefghij", 9, -9);
     test(S("abcdefghijklmnopqrst"), 19, 0, "abcdefghij", 10, -10);
     test(S("abcdefghijklmnopqrst"), 19, 0, "abcdefghijklmnopqrst", 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test11()
+TEST_CONSTEXPR_CXX20 bool test11()
 {
     test(S("abcdefghijklmnopqrst"), 19, 0, "abcdefghijklmnopqrst", 1, -1);
     test(S("abcdefghijklmnopqrst"), 19, 0, "abcdefghijklmnopqrst", 10, -10);
@@ -1292,41 +1314,44 @@ void test11()
     test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 10, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 19, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, "abcdefghijklmnopqrst", 20, 0);
+
+    return true;
+}
+
+template <class S>
+void test() {
+  test0<S>();
+  test1<S>();
+  test2<S>();
+  test3<S>();
+  test4<S>();
+  test5<S>();
+  test6<S>();
+  test7<S>();
+  test8<S>();
+  test9<S>();
+  test10<S>();
+  test11<S>();
+
+  // static_assert(test0<S>());
+  // static_assert(test1<S>());
+  // static_assert(test2<S>());
+  // static_assert(test3<S>());
+  // static_assert(test4<S>());
+  // static_assert(test5<S>());
+  // static_assert(test6<S>());
+  // static_assert(test7<S>());
+  // static_assert(test8<S>());
+  // static_assert(test9<S>());
+  // static_assert(test10<S>());
+  // static_assert(test11<S>());
 }
 
 int main(int, char**)
 {
-    {
-    typedef std::string S;
-    test0<S>();
-    test1<S>();
-    test2<S>();
-    test3<S>();
-    test4<S>();
-    test5<S>();
-    test6<S>();
-    test7<S>();
-    test8<S>();
-    test9<S>();
-    test10<S>();
-    test11<S>();
-    }
+  test<std::string>();
 #if TEST_STD_VER >= 11
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    test0<S>();
-    test1<S>();
-    test2<S>();
-    test3<S>();
-    test4<S>();
-    test5<S>();
-    test6<S>();
-    test7<S>();
-    test8<S>();
-    test9<S>();
-    test10<S>();
-    test11<S>();
-    }
+  test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>();
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
index 55fd823718eec..e4c2dcd7b0be8 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
@@ -360,28 +360,37 @@ void test2()
     test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.compare(0, 1, {"abc", 1}) < 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
index 05ba6ac82c555..7a5cd6a11ad2a 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
@@ -20,7 +20,7 @@
 
 #include "test_macros.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -30,7 +30,7 @@ int sign(int x)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s,   typename S::size_type pos1, typename S::size_type n1,
      const S& str, typename S::size_type pos2, typename S::size_type n2, int x)
 {
@@ -76,7 +76,7 @@ test_npos(const S& s,   typename S::size_type pos1, typename S::size_type n1,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 bool test0()
 {
     test(S(""), 0, 0, S(""), 0, 0, 0);
     test(S(""), 0, 0, S(""), 0, 1, 0);
@@ -178,10 +178,12 @@ void test0()
     test(S(""), 0, 1, S("abcde"), 5, 0, 0);
     test(S(""), 0, 1, S("abcde"), 5, 1, 0);
     test(S(""), 0, 1, S("abcde"), 6, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 bool test1()
 {
     test(S(""), 0, 1, S("abcdefghij"), 0, 0, 0);
     test(S(""), 0, 1, S("abcdefghij"), 0, 1, -1);
@@ -283,10 +285,12 @@ void test1()
     test(S(""), 1, 0, S("abcdefghij"), 11, 0, 0);
     test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
     test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);
+
+    return true;
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 bool test2()
 {
     test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 10, 0);
     test(S(""), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, 0);
@@ -388,10 +392,12 @@ void test2()
     test(S("abcde"), 0, 1, S(""), 0, 1, 1);
     test(S("abcde"), 0, 1, S(""), 1, 0, 0);
     test(S("abcde"), 0, 1, S("abcde"), 0, 0, 1);
+
+    return true;
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 bool test3()
 {
     test(S("abcde"), 0, 1, S("abcde"), 0, 1, 0);
     test(S("abcde"), 0, 1, S("abcde"), 0, 2, -1);
@@ -493,10 +499,12 @@ void test3()
     test(S("abcde"), 0, 2, S("abcdefghij"), 0, 1, 1);
     test(S("abcde"), 0, 2, S("abcdefghij"), 0, 5, -3);
     test(S("abcde"), 0, 2, S("abcdefghij"), 0, 9, -7);
+
+    return true;
 }
 
 template <class S>
-void test4()
+TEST_CONSTEXPR_CXX20 bool test4()
 {
     test(S("abcde"), 0, 2, S("abcdefghij"), 0, 10, -8);
     test(S("abcde"), 0, 2, S("abcdefghij"), 0, 11, -8);
@@ -598,10 +606,12 @@ void test4()
     test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 19, -15);
     test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 20, -16);
     test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 0, 21, -16);
+
+    return true;
 }
 
 template <class S>
-void test5()
+TEST_CONSTEXPR_CXX20 bool test5()
 {
     test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 0, 4);
     test(S("abcde"), 0, 4, S("abcdefghijklmnopqrst"), 1, 1, -1);
@@ -703,10 +713,12 @@ void test5()
     test(S("abcde"), 0, 6, S("abcde"), 0, 2, 3);
     test(S("abcde"), 0, 6, S("abcde"), 0, 4, 1);
     test(S("abcde"), 0, 6, S("abcde"), 0, 5, 0);
+
+    return true;
 }
 
 template <class S>
-void test6()
+TEST_CONSTEXPR_CXX20 bool test6()
 {
     test(S("abcde"), 0, 6, S("abcde"), 0, 6, 0);
     test(S("abcde"), 0, 6, S("abcde"), 1, 0, 5);
@@ -808,10 +820,12 @@ void test6()
     test(S("abcde"), 1, 0, S("abcdefghij"), 0, 11, -10);
     test(S("abcde"), 1, 0, S("abcdefghij"), 1, 0, 0);
     test(S("abcde"), 1, 0, S("abcdefghij"), 1, 1, -1);
+
+    return true;
 }
 
 template <class S>
-void test7()
+TEST_CONSTEXPR_CXX20 bool test7()
 {
     test(S("abcde"), 1, 0, S("abcdefghij"), 1, 4, -4);
     test(S("abcde"), 1, 0, S("abcdefghij"), 1, 8, -8);
@@ -913,10 +927,12 @@ void test7()
     test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 1, 0);
     test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 9, -8);
     test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 18, -17);
+
+    return true;
 }
 
 template <class S>
-void test8()
+TEST_CONSTEXPR_CXX20 bool test8()
 {
     test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 19, -18);
     test(S("abcde"), 1, 1, S("abcdefghijklmnopqrst"), 1, 20, -18);
@@ -1018,10 +1034,12 @@ void test8()
     test(S("abcde"), 1, 3, S("abcde"), 1, 0, 3);
     test(S("abcde"), 1, 3, S("abcde"), 1, 1, 2);
     test(S("abcde"), 1, 3, S("abcde"), 1, 2, 1);
+
+    return true;
 }
 
 template <class S>
-void test9()
+TEST_CONSTEXPR_CXX20 bool test9()
 {
     test(S("abcde"), 1, 3, S("abcde"), 1, 3, 0);
     test(S("abcde"), 1, 3, S("abcde"), 1, 4, -1);
@@ -1123,10 +1141,12 @@ void test9()
     test(S("abcde"), 1, 4, S("abcdefghij"), 1, 8, -4);
     test(S("abcde"), 1, 4, S("abcdefghij"), 1, 9, -5);
     test(S("abcde"), 1, 4, S("abcdefghij"), 1, 10, -5);
+
+    return true;
 }
 
 template <class S>
-void test10()
+TEST_CONSTEXPR_CXX20 bool test10()
 {
     test(S("abcde"), 1, 4, S("abcdefghij"), 5, 0, 4);
     test(S("abcde"), 1, 4, S("abcdefghij"), 5, 1, -4);
@@ -1228,10 +1248,12 @@ void test10()
     test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 1, 20, -15);
     test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 0, 4);
     test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 1, -9);
+
+    return true;
 }
 
 template <class S>
-void test11()
+TEST_CONSTEXPR_CXX20 bool test11()
 {
     test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 5, -9);
     test(S("abcde"), 1, 5, S("abcdefghijklmnopqrst"), 10, 9, -9);
@@ -1333,10 +1355,12 @@ void test11()
     test(S("abcde"), 2, 1, S("abcde"), 1, 4, 1);
     test(S("abcde"), 2, 1, S("abcde"), 1, 5, 1);
     test(S("abcde"), 2, 1, S("abcde"), 2, 0, 1);
+
+    return true;
 }
 
 template <class S>
-void test12()
+TEST_CONSTEXPR_CXX20 bool test12()
 {
     test(S("abcde"), 2, 1, S("abcde"), 2, 1, 0);
     test(S("abcde"), 2, 1, S("abcde"), 2, 2, -1);
@@ -1438,10 +1462,12 @@ void test12()
     test(S("abcde"), 2, 2, S("abcdefghij"), 5, 1, -3);
     test(S("abcde"), 2, 2, S("abcdefghij"), 5, 2, -3);
     test(S("abcde"), 2, 2, S("abcdefghij"), 5, 4, -3);
+
+    return true;
 }
 
 template <class S>
-void test13()
+TEST_CONSTEXPR_CXX20 bool test13()
 {
     test(S("abcde"), 2, 2, S("abcdefghij"), 5, 5, -3);
     test(S("abcde"), 2, 2, S("abcdefghij"), 5, 6, -3);
@@ -1543,10 +1569,12 @@ void test13()
     test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 9, -8);
     test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 10, -8);
     test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 10, 11, -8);
+
+    return true;
 }
 
 template <class S>
-void test14()
+TEST_CONSTEXPR_CXX20 bool test14()
 {
     test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 19, 0, 3);
     test(S("abcde"), 2, 3, S("abcdefghijklmnopqrst"), 19, 1, -17);
@@ -1648,10 +1676,12 @@ void test14()
     test(S("abcde"), 4, 0, S("abcde"), 2, 2, -2);
     test(S("abcde"), 4, 0, S("abcde"), 2, 3, -3);
     test(S("abcde"), 4, 0, S("abcde"), 2, 4, -3);
+
+    return true;
 }
 
 template <class S>
-void test15()
+TEST_CONSTEXPR_CXX20 bool test15()
 {
     test(S("abcde"), 4, 0, S("abcde"), 4, 0, 0);
     test(S("abcde"), 4, 0, S("abcde"), 4, 1, -1);
@@ -1753,10 +1783,12 @@ void test15()
     test(S("abcde"), 4, 1, S("abcdefghij"), 5, 6, -1);
     test(S("abcde"), 4, 1, S("abcdefghij"), 9, 0, 1);
     test(S("abcde"), 4, 1, S("abcdefghij"), 9, 1, -5);
+
+    return true;
 }
 
 template <class S>
-void test16()
+TEST_CONSTEXPR_CXX20 bool test16()
 {
     test(S("abcde"), 4, 1, S("abcdefghij"), 9, 2, -5);
     test(S("abcde"), 4, 1, S("abcdefghij"), 10, 0, 1);
@@ -1858,10 +1890,12 @@ void test16()
     test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 19, 1, -15);
     test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 19, 2, -15);
     test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 20, 0, 1);
+
+    return true;
 }
 
 template <class S>
-void test17()
+TEST_CONSTEXPR_CXX20 bool test17()
 {
     test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 20, 1, 1);
     test(S("abcde"), 4, 2, S("abcdefghijklmnopqrst"), 21, 0, 0);
@@ -1963,10 +1997,12 @@ void test17()
     test(S("abcde"), 5, 1, S("abcde"), 4, 1, -1);
     test(S("abcde"), 5, 1, S("abcde"), 4, 2, -1);
     test(S("abcde"), 5, 1, S("abcde"), 5, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test18()
+TEST_CONSTEXPR_CXX20 bool test18()
 {
     test(S("abcde"), 5, 1, S("abcde"), 5, 1, 0);
     test(S("abcde"), 5, 1, S("abcde"), 6, 0, 0);
@@ -2068,10 +2104,12 @@ void test18()
     test(S("abcde"), 6, 0, S("abcdefghij"), 10, 0, 0);
     test(S("abcde"), 6, 0, S("abcdefghij"), 10, 1, 0);
     test(S("abcde"), 6, 0, S("abcdefghij"), 11, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test19()
+TEST_CONSTEXPR_CXX20 bool test19()
 {
     test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 0, 0);
     test(S("abcde"), 6, 0, S("abcdefghijklmnopqrst"), 0, 1, 0);
@@ -2173,10 +2211,12 @@ void test19()
     test(S("abcdefghij"), 0, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
     test(S("abcdefghij"), 0, 1, S(""), 0, 0, 1);
     test(S("abcdefghij"), 0, 1, S(""), 0, 1, 1);
+
+    return true;
 }
 
 template <class S>
-void test20()
+TEST_CONSTEXPR_CXX20 bool test20()
 {
     test(S("abcdefghij"), 0, 1, S(""), 1, 0, 0);
     test(S("abcdefghij"), 0, 1, S("abcde"), 0, 0, 1);
@@ -2278,10 +2318,12 @@ void test20()
     test(S("abcdefghij"), 0, 5, S("abcde"), 6, 0, 0);
     test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 0, 5);
     test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 1, 4);
+
+    return true;
 }
 
 template <class S>
-void test21()
+TEST_CONSTEXPR_CXX20 bool test21()
 {
     test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 5, 0);
     test(S("abcdefghij"), 0, 5, S("abcdefghij"), 0, 9, -4);
@@ -2383,10 +2425,12 @@ void test21()
     test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 1, 8);
     test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 10, -1);
     test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 19, -10);
+
+    return true;
 }
 
 template <class S>
-void test22()
+TEST_CONSTEXPR_CXX20 bool test22()
 {
     test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 20, -11);
     test(S("abcdefghij"), 0, 9, S("abcdefghijklmnopqrst"), 0, 21, -11);
@@ -2488,10 +2532,12 @@ void test22()
     test(S("abcdefghij"), 0, 11, S("abcde"), 0, 0, 10);
     test(S("abcdefghij"), 0, 11, S("abcde"), 0, 1, 9);
     test(S("abcdefghij"), 0, 11, S("abcde"), 0, 2, 8);
+
+    return true;
 }
 
 template <class S>
-void test23()
+TEST_CONSTEXPR_CXX20 bool test23()
 {
     test(S("abcdefghij"), 0, 11, S("abcde"), 0, 4, 6);
     test(S("abcdefghij"), 0, 11, S("abcde"), 0, 5, 5);
@@ -2593,10 +2639,12 @@ void test23()
     test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 9, -9);
     test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 10, -10);
     test(S("abcdefghij"), 1, 0, S("abcdefghij"), 0, 11, -10);
+
+    return true;
 }
 
 template <class S>
-void test24()
+TEST_CONSTEXPR_CXX20 bool test24()
 {
     test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 0, 0);
     test(S("abcdefghij"), 1, 0, S("abcdefghij"), 1, 1, -1);
@@ -2698,10 +2746,12 @@ void test24()
     test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 0, 21, 1);
     test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 0, 1);
     test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 1, 0);
+
+    return true;
 }
 
 template <class S>
-void test25()
+TEST_CONSTEXPR_CXX20 bool test25()
 {
     test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 9, -8);
     test(S("abcdefghij"), 1, 1, S("abcdefghijklmnopqrst"), 1, 18, -17);
@@ -2803,10 +2853,12 @@ void test25()
     test(S("abcdefghij"), 1, 8, S("abcde"), 0, 5, 1);
     test(S("abcdefghij"), 1, 8, S("abcde"), 0, 6, 1);
     test(S("abcdefghij"), 1, 8, S("abcde"), 1, 0, 8);
+
+    return true;
 }
 
 template <class S>
-void test26()
+TEST_CONSTEXPR_CXX20 bool test26()
 {
     test(S("abcdefghij"), 1, 8, S("abcde"), 1, 1, 7);
     test(S("abcdefghij"), 1, 8, S("abcde"), 1, 2, 6);
@@ -2908,10 +2960,12 @@ void test26()
     test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 1, 8);
     test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 4, 5);
     test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 8, 1);
+
+    return true;
 }
 
 template <class S>
-void test27()
+TEST_CONSTEXPR_CXX20 bool test27()
 {
     test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 9, 0);
     test(S("abcdefghij"), 1, 9, S("abcdefghij"), 1, 10, 0);
@@ -3013,10 +3067,12 @@ void test27()
     test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 18, -9);
     test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 19, -10);
     test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 1, 20, -10);
+
+    return true;
 }
 
 template <class S>
-void test28()
+TEST_CONSTEXPR_CXX20 bool test28()
 {
     test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 0, 9);
     test(S("abcdefghij"), 1, 10, S("abcdefghijklmnopqrst"), 10, 1, -9);
@@ -3118,10 +3174,12 @@ void test28()
     test(S("abcdefghij"), 5, 1, S("abcde"), 1, 2, 4);
     test(S("abcdefghij"), 5, 1, S("abcde"), 1, 3, 4);
     test(S("abcdefghij"), 5, 1, S("abcde"), 1, 4, 4);
+
+    return true;
 }
 
 template <class S>
-void test29()
+TEST_CONSTEXPR_CXX20 bool test29()
 {
     test(S("abcdefghij"), 5, 1, S("abcde"), 1, 5, 4);
     test(S("abcdefghij"), 5, 1, S("abcde"), 2, 0, 1);
@@ -3223,10 +3281,12 @@ void test29()
     test(S("abcdefghij"), 5, 2, S("abcdefghij"), 1, 10, 4);
     test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 0, 2);
     test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 1, 1);
+
+    return true;
 }
 
 template <class S>
-void test30()
+TEST_CONSTEXPR_CXX20 bool test30()
 {
     test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 2, 0);
     test(S("abcdefghij"), 5, 2, S("abcdefghij"), 5, 4, -2);
@@ -3328,10 +3388,12 @@ void test30()
     test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 1, -5);
     test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 5, -5);
     test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 9, -5);
+
+    return true;
 }
 
 template <class S>
-void test31()
+TEST_CONSTEXPR_CXX20 bool test31()
 {
     test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 10, -5);
     test(S("abcdefghij"), 5, 4, S("abcdefghijklmnopqrst"), 10, 11, -5);
@@ -3433,10 +3495,12 @@ void test31()
     test(S("abcdefghij"), 5, 6, S("abcde"), 2, 0, 5);
     test(S("abcdefghij"), 5, 6, S("abcde"), 2, 1, 3);
     test(S("abcdefghij"), 5, 6, S("abcde"), 2, 2, 3);
+
+    return true;
 }
 
 template <class S>
-void test32()
+TEST_CONSTEXPR_CXX20 bool test32()
 {
     test(S("abcdefghij"), 5, 6, S("abcde"), 2, 3, 3);
     test(S("abcdefghij"), 5, 6, S("abcde"), 2, 4, 3);
@@ -3538,10 +3602,12 @@ void test32()
     test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 4, -4);
     test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 5, -5);
     test(S("abcdefghij"), 9, 0, S("abcdefghij"), 5, 6, -5);
+
+    return true;
 }
 
 template <class S>
-void test33()
+TEST_CONSTEXPR_CXX20 bool test33()
 {
     test(S("abcdefghij"), 9, 0, S("abcdefghij"), 9, 0, 0);
     test(S("abcdefghij"), 9, 0, S("abcdefghij"), 9, 1, -1);
@@ -3643,10 +3709,12 @@ void test33()
     test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 10, 11, -1);
     test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 0, 1);
     test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 1, -10);
+
+    return true;
 }
 
 template <class S>
-void test34()
+TEST_CONSTEXPR_CXX20 bool test34()
 {
     test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 19, 2, -10);
     test(S("abcdefghij"), 9, 1, S("abcdefghijklmnopqrst"), 20, 0, 1);
@@ -3748,10 +3816,12 @@ void test34()
     test(S("abcdefghij"), 10, 0, S("abcde"), 2, 4, -3);
     test(S("abcdefghij"), 10, 0, S("abcde"), 4, 0, 0);
     test(S("abcdefghij"), 10, 0, S("abcde"), 4, 1, -1);
+
+    return true;
 }
 
 template <class S>
-void test35()
+TEST_CONSTEXPR_CXX20 bool test35()
 {
     test(S("abcdefghij"), 10, 0, S("abcde"), 4, 2, -1);
     test(S("abcdefghij"), 10, 0, S("abcde"), 5, 0, 0);
@@ -3853,10 +3923,12 @@ void test35()
     test(S("abcdefghij"), 10, 1, S("abcdefghij"), 9, 1, -1);
     test(S("abcdefghij"), 10, 1, S("abcdefghij"), 9, 2, -1);
     test(S("abcdefghij"), 10, 1, S("abcdefghij"), 10, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test36()
+TEST_CONSTEXPR_CXX20 bool test36()
 {
     test(S("abcdefghij"), 10, 1, S("abcdefghij"), 10, 1, 0);
     test(S("abcdefghij"), 10, 1, S("abcdefghij"), 11, 0, 0);
@@ -3958,10 +4030,12 @@ void test36()
     test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
     test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghij"), 11, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test37()
+TEST_CONSTEXPR_CXX20 bool test37()
 {
     test(S("abcdefghijklmnopqrst"), 0, 0, S(""), 0, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 0, S(""), 0, 1, 0);
@@ -4063,10 +4137,12 @@ void test37()
     test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 5, 0, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 5, 1, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, S("abcde"), 6, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test38()
+TEST_CONSTEXPR_CXX20 bool test38()
 {
     test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 0, 1);
     test(S("abcdefghijklmnopqrst"), 0, 1, S("abcdefghij"), 0, 1, 0);
@@ -4168,10 +4244,12 @@ void test38()
     test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghij"), 11, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 0, 10);
     test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 1, 9);
+
+    return true;
 }
 
 template <class S>
-void test39()
+TEST_CONSTEXPR_CXX20 bool test39()
 {
     test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 10, 0);
     test(S("abcdefghijklmnopqrst"), 0, 10, S("abcdefghijklmnopqrst"), 0, 19, -9);
@@ -4273,10 +4351,12 @@ void test39()
     test(S("abcdefghijklmnopqrst"), 0, 20, S(""), 0, 1, 20);
     test(S("abcdefghijklmnopqrst"), 0, 20, S(""), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 0, 20);
+
+    return true;
 }
 
 template <class S>
-void test40()
+TEST_CONSTEXPR_CXX20 bool test40()
 {
     test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 1, 19);
     test(S("abcdefghijklmnopqrst"), 0, 20, S("abcde"), 0, 2, 18);
@@ -4378,10 +4458,12 @@ void test40()
     test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 1, 19);
     test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 5, 15);
     test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 9, 11);
+
+    return true;
 }
 
 template <class S>
-void test41()
+TEST_CONSTEXPR_CXX20 bool test41()
 {
     test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 10, 10);
     test(S("abcdefghijklmnopqrst"), 0, 21, S("abcdefghij"), 0, 11, 10);
@@ -4483,10 +4565,12 @@ void test41()
     test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 19, -19);
     test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 20, -20);
     test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 0, 21, -20);
+
+    return true;
 }
 
 template <class S>
-void test42()
+TEST_CONSTEXPR_CXX20 bool test42()
 {
     test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 1, 0, S("abcdefghijklmnopqrst"), 1, 1, -1);
@@ -4588,10 +4672,12 @@ void test42()
     test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 2, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 4, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 5, 1);
+
+    return true;
 }
 
 template <class S>
-void test43()
+TEST_CONSTEXPR_CXX20 bool test43()
 {
     test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 0, 6, 1);
     test(S("abcdefghijklmnopqrst"), 1, 9, S("abcde"), 1, 0, 9);
@@ -4693,10 +4779,12 @@ void test43()
     test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 0, 11, 1);
     test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 0, 18);
     test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 1, 17);
+
+    return true;
 }
 
 template <class S>
-void test44()
+TEST_CONSTEXPR_CXX20 bool test44()
 {
     test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 4, 14);
     test(S("abcdefghijklmnopqrst"), 1, 18, S("abcdefghij"), 1, 8, 10);
@@ -4798,10 +4886,12 @@ void test44()
     test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 1, 18);
     test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 9, 10);
     test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 18, 1);
+
+    return true;
 }
 
 template <class S>
-void test45()
+TEST_CONSTEXPR_CXX20 bool test45()
 {
     test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 19, 0);
     test(S("abcdefghijklmnopqrst"), 1, 19, S("abcdefghijklmnopqrst"), 1, 20, 0);
@@ -4903,10 +4993,12 @@ void test45()
     test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 0, 0);
     test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 1, -1);
     test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 2, -2);
+
+    return true;
 }
 
 template <class S>
-void test46()
+TEST_CONSTEXPR_CXX20 bool test46()
 {
     test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 3, -3);
     test(S("abcdefghijklmnopqrst"), 10, 0, S("abcde"), 1, 4, -4);
@@ -5008,10 +5100,12 @@ void test46()
     test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 8, 9);
     test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 9, 9);
     test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 1, 10, 9);
+
+    return true;
 }
 
 template <class S>
-void test47()
+TEST_CONSTEXPR_CXX20 bool test47()
 {
     test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 0, 1);
     test(S("abcdefghijklmnopqrst"), 10, 1, S("abcdefghij"), 5, 1, 5);
@@ -5113,10 +5207,12 @@ void test47()
     test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 1, 20, 9);
     test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 0, 5);
     test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 1, 4);
+
+    return true;
 }
 
 template <class S>
-void test48()
+TEST_CONSTEXPR_CXX20 bool test48()
 {
     test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 5, 0);
     test(S("abcdefghijklmnopqrst"), 10, 5, S("abcdefghijklmnopqrst"), 10, 9, -4);
@@ -5218,10 +5314,12 @@ void test48()
     test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 4, 9);
     test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 1, 5, 9);
     test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 0, 10);
+
+    return true;
 }
 
 template <class S>
-void test49()
+TEST_CONSTEXPR_CXX20 bool test49()
 {
     test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 1, 8);
     test(S("abcdefghijklmnopqrst"), 10, 10, S("abcde"), 2, 2, 8);
@@ -5323,10 +5421,12 @@ void test49()
     test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 1, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 2, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 4, 5);
+
+    return true;
 }
 
 template <class S>
-void test50()
+TEST_CONSTEXPR_CXX20 bool test50()
 {
     test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 5, 5);
     test(S("abcdefghijklmnopqrst"), 10, 11, S("abcdefghij"), 5, 6, 5);
@@ -5428,10 +5528,12 @@ void test50()
     test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 9, -9);
     test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 10, -10);
     test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 10, 11, -10);
+
+    return true;
 }
 
 template <class S>
-void test51()
+TEST_CONSTEXPR_CXX20 bool test51()
 {
     test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 19, 0, 0);
     test(S("abcdefghijklmnopqrst"), 19, 0, S("abcdefghijklmnopqrst"), 19, 1, -1);
@@ -5533,10 +5635,12 @@ void test51()
     test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 2, 17);
     test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 3, 17);
     test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 2, 4, 17);
+
+    return true;
 }
 
 template <class S>
-void test52()
+TEST_CONSTEXPR_CXX20 bool test52()
 {
     test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 4, 0, 1);
     test(S("abcdefghijklmnopqrst"), 19, 2, S("abcde"), 4, 1, 15);
@@ -5638,10 +5742,12 @@ void test52()
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 5, 6, -5);
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 0, 0);
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 1, -1);
+
+    return true;
 }
 
 template <class S>
-void test53()
+TEST_CONSTEXPR_CXX20 bool test53()
 {
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 9, 2, -1);
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghij"), 10, 0, 0);
@@ -5743,10 +5849,12 @@ void test53()
     test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 19, 1, -1);
     test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 19, 2, -1);
     test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 20, 0, 0);
+
+    return true;
 }
 
 template <class S>
-void test54()
+TEST_CONSTEXPR_CXX20 bool test54()
 {
     test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghijklmnopqrst"), 20, 1, S("abcdefghijklmnopqrst"), 21, 0, 0);
@@ -5824,139 +5932,144 @@ void test54()
     test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 20, 0, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 20, 1, 0);
     test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
+
+    return true;
 }
 
 template<class S>
-void test55()
+TEST_CONSTEXPR_CXX20 bool test55()
 {
     test_npos(S(""), 0, 0, S(""), 0, 0);
     test_npos(S(""), 0, 0, S("abcde"), 0, -5);
     test_npos(S("abcde"), 0, 0, S("abcdefghij"), 0, -10);
     test_npos(S("abcde"), 0, 0, S("abcdefghij"), 1, -9);
     test_npos(S("abcde"), 0, 0, S("abcdefghij"), 5, -5);
+
+    return true;
+}
+
+template <class S>
+void test() {
+  test0<S>();
+  test1<S>();
+  test2<S>();
+  test3<S>();
+  test4<S>();
+  test5<S>();
+  test6<S>();
+  test7<S>();
+  test8<S>();
+  test9<S>();
+  test10<S>();
+  test11<S>();
+  test12<S>();
+  test13<S>();
+  test14<S>();
+  test15<S>();
+  test16<S>();
+  test17<S>();
+  test18<S>();
+  test19<S>();
+  test20<S>();
+  test21<S>();
+  test22<S>();
+  test23<S>();
+  test24<S>();
+  test25<S>();
+  test26<S>();
+  test27<S>();
+  test28<S>();
+  test29<S>();
+  test30<S>();
+  test31<S>();
+  test32<S>();
+  test33<S>();
+  test34<S>();
+  test35<S>();
+  test36<S>();
+  test37<S>();
+  test38<S>();
+  test39<S>();
+  test40<S>();
+  test41<S>();
+  test42<S>();
+  test43<S>();
+  test44<S>();
+  test45<S>();
+  test46<S>();
+  test47<S>();
+  test48<S>();
+  test49<S>();
+  test50<S>();
+  test51<S>();
+  test52<S>();
+  test53<S>();
+  test54<S>();
+  test55<S>();
+
+  // static_assert(test0<S>());
+  // static_assert(test1<S>());
+  // static_assert(test2<S>());
+  // static_assert(test3<S>());
+  // static_assert(test4<S>());
+  // static_assert(test5<S>());
+  // static_assert(test6<S>());
+  // static_assert(test7<S>());
+  // static_assert(test8<S>());
+  // static_assert(test9<S>());
+  // static_assert(test10<S>());
+  // static_assert(test11<S>());
+  // static_assert(test12<S>());
+  // static_assert(test13<S>());
+  // static_assert(test14<S>());
+  // static_assert(test15<S>());
+  // static_assert(test16<S>());
+  // static_assert(test17<S>());
+  // static_assert(test18<S>());
+  // static_assert(test19<S>());
+  // static_assert(test20<S>());
+  // static_assert(test21<S>());
+  // static_assert(test22<S>());
+  // static_assert(test23<S>());
+  // static_assert(test24<S>());
+  // static_assert(test25<S>());
+  // static_assert(test26<S>());
+  // static_assert(test27<S>());
+  // static_assert(test28<S>());
+  // static_assert(test29<S>());
+  // static_assert(test30<S>());
+  // static_assert(test31<S>());
+  // static_assert(test32<S>());
+  // static_assert(test33<S>());
+  // static_assert(test34<S>());
+  // static_assert(test35<S>());
+  // static_assert(test36<S>());
+  // static_assert(test37<S>());
+  // static_assert(test38<S>());
+  // static_assert(test39<S>());
+  // static_assert(test40<S>());
+  // static_assert(test41<S>());
+  // static_assert(test42<S>());
+  // static_assert(test43<S>());
+  // static_assert(test44<S>());
+  // static_assert(test45<S>());
+  // static_assert(test46<S>());
+  // static_assert(test47<S>());
+  // static_assert(test48<S>());
+  // static_assert(test49<S>());
+  // static_assert(test50<S>());
+  // static_assert(test51<S>());
+  // static_assert(test52<S>());
+  // static_assert(test53<S>());
+  // static_assert(test54<S>());
+  // static_assert(test55<S>());
 }
 
 int main(int, char**)
 {
-    {
-    typedef std::string S;
-    test0<S>();
-    test1<S>();
-    test2<S>();
-    test3<S>();
-    test4<S>();
-    test5<S>();
-    test6<S>();
-    test7<S>();
-    test8<S>();
-    test9<S>();
-    test10<S>();
-    test11<S>();
-    test12<S>();
-    test13<S>();
-    test14<S>();
-    test15<S>();
-    test16<S>();
-    test17<S>();
-    test18<S>();
-    test19<S>();
-    test20<S>();
-    test21<S>();
-    test22<S>();
-    test23<S>();
-    test24<S>();
-    test25<S>();
-    test26<S>();
-    test27<S>();
-    test28<S>();
-    test29<S>();
-    test30<S>();
-    test31<S>();
-    test32<S>();
-    test33<S>();
-    test34<S>();
-    test35<S>();
-    test36<S>();
-    test37<S>();
-    test38<S>();
-    test39<S>();
-    test40<S>();
-    test41<S>();
-    test42<S>();
-    test43<S>();
-    test44<S>();
-    test45<S>();
-    test46<S>();
-    test47<S>();
-    test48<S>();
-    test49<S>();
-    test50<S>();
-    test51<S>();
-    test52<S>();
-    test53<S>();
-    test54<S>();
-    test55<S>();
-    }
+  test<std::string>();
 #if TEST_STD_VER >= 11
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    test0<S>();
-    test1<S>();
-    test2<S>();
-    test3<S>();
-    test4<S>();
-    test5<S>();
-    test6<S>();
-    test7<S>();
-    test8<S>();
-    test9<S>();
-    test10<S>();
-    test11<S>();
-    test12<S>();
-    test13<S>();
-    test14<S>();
-    test15<S>();
-    test16<S>();
-    test17<S>();
-    test18<S>();
-    test19<S>();
-    test20<S>();
-    test21<S>();
-    test22<S>();
-    test23<S>();
-    test24<S>();
-    test25<S>();
-    test26<S>();
-    test27<S>();
-    test28<S>();
-    test29<S>();
-    test30<S>();
-    test31<S>();
-    test32<S>();
-    test33<S>();
-    test34<S>();
-    test35<S>();
-    test36<S>();
-    test37<S>();
-    test38<S>();
-    test39<S>();
-    test40<S>();
-    test41<S>();
-    test42<S>();
-    test43<S>();
-    test44<S>();
-    test45<S>();
-    test46<S>();
-    test47<S>();
-    test48<S>();
-    test49<S>();
-    test50<S>();
-    test51<S>();
-    test52<S>();
-    test53<S>();
-    test54<S>();
-    test55<S>();
-    }
+  test<std::basic_string<char, std::char_traits<char>, min_allocator<char>>>();
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
index ddc41f3c3094f..19d749535d920 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
@@ -18,7 +18,7 @@
 
 #include "test_macros.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -28,7 +28,7 @@ int sign(int x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::size_type pos1, typename S::size_type n1,
      SV sv, int x)
 {
@@ -51,7 +51,7 @@ test(const S& s, typename S::size_type pos1, typename S::size_type n1,
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), 0, 0, SV(""), 0);
     test(S(""), 0, 0, SV("abcde"), -5);
@@ -156,7 +156,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("abcde"), 6, 0, SV(""), 0);
     test(S("abcde"), 6, 0, SV("abcde"), 0);
@@ -261,7 +261,7 @@ void test1()
 }
 
 template <class S, class SV>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("abcdefghijklmnopqrst"), 0, 0, SV(""), 0);
     test(S("abcdefghijklmnopqrst"), 0, 0, SV("abcde"), -5);
@@ -361,23 +361,32 @@ void test2()
     test(S("abcdefghijklmnopqrst"), 21, 0, SV("abcdefghijklmnopqrst"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
     test2<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
     test2<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
index 76237cda8a8c9..f73a42188b3fc 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
@@ -16,7 +16,7 @@
 #include "test_macros.h"
 #include "min_allocator.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -26,16 +26,15 @@ int sign(int x)
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, int x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
     assert(sign(s.compare(str)) == sign(x));
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), S(""), 0);
     test(S(""), S("abcde"), -5);
@@ -53,9 +52,9 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), S("abcde"), 15);
     test(S("abcdefghijklmnopqrst"), S("abcdefghij"), 10);
     test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), 0);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), S(""), 0);
     test(S(""), S("abcde"), -5);
@@ -73,14 +72,24 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), S("abcde"), 15);
     test(S("abcdefghijklmnopqrst"), S("abcdefghij"), 10);
     test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), 0);
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.compare({"abc", 1}) < 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
index fc145f8576c5e..af75b6c863a35 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
@@ -16,7 +16,7 @@
 #include "test_macros.h"
 #include "min_allocator.h"
 
-int sign(int x)
+TEST_CONSTEXPR_CXX20 int sign(int x)
 {
     if (x == 0)
         return 0;
@@ -26,16 +26,15 @@ int sign(int x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, int x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.compare(sv));
     assert(sign(s.compare(sv)) == sign(x));
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test(S(""), SV(""), 0);
@@ -54,9 +53,9 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), SV("abcde"), 15);
     test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), 10);
     test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), 0);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test(S(""), SV(""), 0);
@@ -75,7 +74,17 @@ int main(int, char**)
     test(S("abcdefghijklmnopqrst"), SV("abcde"), 15);
     test(S("abcdefghijklmnopqrst"), SV("abcdefghij"), 10);
     test(S("abcdefghijklmnopqrst"), SV("abcdefghijklmnopqrst"), 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
index bf688efbfe3b8..996acf3774978 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(x < s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'q', 0, S::npos);
     test(S(""), 'q', 1, S::npos);
@@ -68,9 +67,9 @@ int main(int, char**)
     test(S("csope"), 'q', 0);
     test(S("gfsmthlkon"), 'q', 0);
     test(S("laenfsbridchgotmkqpj"), 'q', 0);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'q', 0, S::npos);
     test(S(""), 'q', 1, S::npos);
@@ -99,7 +98,17 @@ int main(int, char**)
     test(S("csope"), 'q', 0);
     test(S("gfsmthlkon"), 'q', 0);
     test(S("laenfsbridchgotmkqpj"), 'q', 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
index 37ae43e77a37d..97a4d500811f0 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     assert(s.find_first_not_of(str) == x);
@@ -37,7 +37,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, S::npos);
     test(S(""), "laenf", 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", S::npos);
     test(S(""), "laenf", S::npos);
@@ -142,19 +142,28 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
index d4776a0c56cf0..0d6224f3ba63e 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, S::npos);
     test(S(""), "irkhs", 0, 0, S::npos);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("gbhqo"), "skqne", 5, 4, S::npos);
     test(S("ktdor"), "kipnf", 5, 5, S::npos);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("sdpcilonqj"), "dnjfsagktr", 10, 5, S::npos);
     test(S("gtfbdkqeml"), "nejaktmiqg", 10, 9, S::npos);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("pboqganrhedjmltsicfk"), "gbkhdnpoietfcmrslajq", 20, 1, S::npos);
     test(S("klchabsimetjnqgorfpd"), "rtfnmbsglkjaichoqedp", 20, 10, S::npos);
@@ -367,23 +367,32 @@ void test3()
     test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
index 554b4a687d57b..6101dce71f477 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, S::npos);
     test(S(""), S("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), S::npos);
     test(S(""), S("laenf"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.find_first_not_of({"abc", 1}) == 0);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
index 51cef0fea4b06..01ce8bc3a1347 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, S::npos);
     test(S(""), SV("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), S::npos);
     test(S(""), SV("laenf"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
index 7ba1c618de649..b3884ac423622 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(x < s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'e', 0, S::npos);
     test(S(""), 'e', 1, S::npos);
@@ -66,9 +65,9 @@ int main(int, char**)
     test(S("csope"), 'e', 4);
     test(S("gfsmthlkon"), 'e', S::npos);
     test(S("laenfsbridchgotmkqpj"), 'e', 2);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'e', 0, S::npos);
     test(S(""), 'e', 1, S::npos);
@@ -95,7 +94,17 @@ int main(int, char**)
     test(S("csope"), 'e', 4);
     test(S("gfsmthlkon"), 'e', S::npos);
     test(S("laenfsbridchgotmkqpj"), 'e', 2);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
index a54f4801a5b98..27952f1ded781 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
@@ -38,7 +38,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, S::npos);
     test(S(""), "laenf", 0, S::npos);
@@ -123,7 +123,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", S::npos);
     test(S(""), "laenf", S::npos);
@@ -143,19 +143,28 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
index e95066aeb2c7c..c815160df440d 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, S::npos);
     test(S(""), "irkhs", 0, 0, S::npos);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("gbhqo"), "skqne", 5, 4, S::npos);
     test(S("ktdor"), "kipnf", 5, 5, S::npos);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("sdpcilonqj"), "dnjfsagktr", 10, 5, S::npos);
     test(S("gtfbdkqeml"), "nejaktmiqg", 10, 9, S::npos);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("pboqganrhedjmltsicfk"), "gbkhdnpoietfcmrslajq", 20, 1, S::npos);
     test(S("klchabsimetjnqgorfpd"), "rtfnmbsglkjaichoqedp", 20, 10, S::npos);
@@ -367,23 +367,32 @@ void test3()
     test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
index d30254adb3ed9..2f065d5f37978 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, S::npos);
     test(S(""), S("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), S::npos);
     test(S(""), S("laenf"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.find_first_of({"abc", 1}) == std::string::npos);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
index 7570c33465d4d..762c11302f722 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, S::npos);
     test(S(""), SV("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), S::npos);
     test(S(""), SV("laenf"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
index 25120bb17a4b2..e919f29c8611e 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(x < s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'i', 0, S::npos);
     test(S(""), 'i', 1, S::npos);
@@ -66,9 +65,9 @@ int main(int, char**)
     test(S("csope"), 'i', 4);
     test(S("gfsmthlkon"), 'i', 9);
     test(S("laenfsbridchgotmkqpj"), 'i', 19);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'i', 0, S::npos);
     test(S(""), 'i', 1, S::npos);
@@ -95,7 +94,17 @@ int main(int, char**)
     test(S("csope"), 'i', 4);
     test(S("gfsmthlkon"), 'i', 9);
     test(S("laenfsbridchgotmkqpj"), 'i', 19);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
index 56c0ee74ebc2d..2d34815e5fcc3 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
@@ -38,7 +38,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, S::npos);
     test(S(""), "laenf", 0, S::npos);
@@ -123,7 +123,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", S::npos);
     test(S(""), "laenf", S::npos);
@@ -143,19 +143,28 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
index 0b4eb9698cc8d..d0bfd8610c23b 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, S::npos);
     test(S(""), "irkhs", 0, 0, S::npos);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("gbhqo"), "skqne", 5, 4, 4);
     test(S("ktdor"), "kipnf", 5, 5, 4);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("sdpcilonqj"), "dnjfsagktr", 10, 5, 8);
     test(S("gtfbdkqeml"), "nejaktmiqg", 10, 9, 9);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("pboqganrhedjmltsicfk"), "gbkhdnpoietfcmrslajq", 20, 1, 19);
     test(S("klchabsimetjnqgorfpd"), "rtfnmbsglkjaichoqedp", 20, 10, 19);
@@ -367,23 +367,32 @@ void test3()
     test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
index 1c2bd125c91c5..25e20ff0340f1 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, S::npos);
     test(S(""), S("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), S::npos);
     test(S(""), S("laenf"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.find_last_not_of({"abc", 1}) == s.size() - 1);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
index 9b7d8d0210ae7..4b274fe0a8a88 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, S::npos);
     test(S(""), SV("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), S::npos);
     test(S(""), SV("laenf"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
 //     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
 //     typedef std::string_view SV;
 //     test0<S, SV>();
 //     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
index 3273ecd351045..0445d17c2a147 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(x < s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'm', 0, S::npos);
     test(S(""), 'm', 1, S::npos);
@@ -66,9 +65,9 @@ int main(int, char**)
     test(S("csope"), 'm', S::npos);
     test(S("gfsmthlkon"), 'm', 3);
     test(S("laenfsbridchgotmkqpj"), 'm', 15);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'm', 0, S::npos);
     test(S(""), 'm', 1, S::npos);
@@ -95,7 +94,17 @@ int main(int, char**)
     test(S("csope"), 'm', S::npos);
     test(S("gfsmthlkon"), 'm', 3);
     test(S("laenfsbridchgotmkqpj"), 'm', 15);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
index a86c104d95625..5b288c429ea92 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
@@ -38,7 +38,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, S::npos);
     test(S(""), "laenf", 0, S::npos);
@@ -123,7 +123,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", S::npos);
     test(S(""), "laenf", S::npos);
@@ -143,19 +143,28 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), "htaobedqikfplcgjsmrn", 19);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
index c3420d5cfaa8e..8ff4556e5383e 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, S::npos);
     test(S(""), "irkhs", 0, 0, S::npos);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("gbhqo"), "skqne", 5, 4, 3);
     test(S("ktdor"), "kipnf", 5, 5, 0);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("sdpcilonqj"), "dnjfsagktr", 10, 5, 9);
     test(S("gtfbdkqeml"), "nejaktmiqg", 10, 9, 8);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("pboqganrhedjmltsicfk"), "gbkhdnpoietfcmrslajq", 20, 1, 4);
     test(S("klchabsimetjnqgorfpd"), "rtfnmbsglkjaichoqedp", 20, 10, 17);
@@ -367,23 +367,32 @@ void test3()
     test(S("hnbrcplsjfgiktoedmaq"), "qprlsfojamgndekthibc", 21, 20, 19);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
index a6e8d1a69c0a6..f65f9079a5df1 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, S::npos);
     test(S(""), S("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), S::npos);
     test(S(""), S("laenf"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), S("htaobedqikfplcgjsmrn"), 19);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.find_last_of({"abc", 1}) == std::string::npos);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
index a44ddd9bd159a..1e0af418e8065 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, S::npos);
     test(S(""), SV("laenf"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), S::npos);
     test(S(""), SV("laenf"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("pniotcfrhqsmgdkjbael"), SV("htaobedqikfplcgjsmrn"), 19);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
index bbd846142abd6..e6f9e39b28a9f 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(0 <= x && x + 1 <= s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'c', 0, S::npos);
     test(S(""), 'c', 1, S::npos);
@@ -66,9 +65,9 @@ int main(int, char**)
     test(S("abcde"), 'c', 2);
     test(S("abcdeabcde"), 'c', 2);
     test(S("abcdeabcdeabcdeabcde"), 'c', 2);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'c', 0, S::npos);
     test(S(""), 'c', 1, S::npos);
@@ -95,7 +94,17 @@ int main(int, char**)
     test(S("abcde"), 'c', 2);
     test(S("abcdeabcde"), 'c', 2);
     test(S("abcdeabcdeabcdeabcde"), 'c', 2);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
index c06797a24588e..cff4d75b2c9c3 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -31,7 +31,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(str));
@@ -44,7 +44,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0);
     test(S(""), "abcde", 0, S::npos);
@@ -129,7 +129,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", 0);
     test(S(""), "abcde", S::npos);
@@ -149,19 +149,28 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
index 3ca6b3a7d5f89..3ce531de52c90 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, 0);
     test(S(""), "abcde", 0, 0, 0);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("abcde"), "abcde", 5, 4, S::npos);
     test(S("abcde"), "abcde", 5, 5, S::npos);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("abcdeabcde"), "abcdeabcde", 10, 5, S::npos);
     test(S("abcdeabcde"), "abcdeabcde", 10, 9, S::npos);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 20, 1, S::npos);
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 20, 10, S::npos);
@@ -367,23 +367,32 @@ void test3()
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, S::npos);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
index 3aef261a01fe8..edc2adb1e3aa8 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, 0);
     test(S(""), S("abcde"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), 0);
     test(S(""), S("abcde"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.find({"abc", 1}) == std::string::npos);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
index c74b5a44a87c3..2402e70e44abf 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.find(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, 0);
     test(S(""), SV("abcde"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), 0);
     test(S(""), SV("abcde"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), SV("abcdeabcdeabcdeabcde"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
index 49a5fbc5f86d4..77f4cbc4514ad 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, typename S::value_type c, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(c));
@@ -37,9 +37,8 @@ test(const S& s, typename S::value_type c, typename S::size_type x)
         assert(x + 1 <= s.size());
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test(S(""), 'b', 0, S::npos);
     test(S(""), 'b', 1, S::npos);
@@ -66,9 +65,9 @@ int main(int, char**)
     test(S("abcde"), 'b', 1);
     test(S("abcdeabcde"), 'b', 6);
     test(S("abcdeabcdeabcdeabcde"), 'b', 16);
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), 'b', 0, S::npos);
     test(S(""), 'b', 1, S::npos);
@@ -95,7 +94,17 @@ int main(int, char**)
     test(S("abcde"), 'b', 1);
     test(S("abcdeabcde"), 'b', 6);
     test(S("abcdeabcdeabcdeabcde"), 'b', 16);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
index 4006161405989..c05844fcedd41 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
@@ -31,7 +31,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
@@ -45,7 +45,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0);
     test(S(""), "abcde", 0, S::npos);
@@ -130,7 +130,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), "", 0);
     test(S(""), "abcde", S::npos);
@@ -150,19 +150,28 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
index 2bcb486d99528..339708979d09b 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
       typename S::size_type n, typename S::size_type x)
 {
@@ -28,7 +28,7 @@ test(const S& s, const typename S::value_type* str, typename S::size_type pos,
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), "", 0, 0, 0);
     test(S(""), "abcde", 0, 0, 0);
@@ -133,7 +133,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S("abcde"), "abcde", 5, 4, 0);
     test(S("abcde"), "abcde", 5, 5, 0);
@@ -238,7 +238,7 @@ void test1()
 }
 
 template <class S>
-void test2()
+TEST_CONSTEXPR_CXX20 void test2()
 {
     test(S("abcdeabcde"), "abcdeabcde", 10, 5, 5);
     test(S("abcdeabcde"), "abcdeabcde", 10, 9, 0);
@@ -343,7 +343,7 @@ void test2()
 }
 
 template <class S>
-void test3()
+TEST_CONSTEXPR_CXX20 void test3()
 {
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 20, 1, 15);
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 20, 10, 10);
@@ -367,23 +367,32 @@ void test3()
     test(S("abcdeabcdeabcdeabcde"), "abcdeabcdeabcdeabcde", 21, 20, 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
     test2<S>();
     test3<S>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
index a1932c7bcf622..62a87562bd127 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
@@ -27,7 +27,7 @@ test(const S& s, const S& str, typename S::size_type pos, typename S::size_type
 }
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
@@ -37,7 +37,7 @@ test(const S& s, const S& str, typename S::size_type x)
 }
 
 template <class S>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), S(""), 0, 0);
     test(S(""), S("abcde"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), S(""), 0);
     test(S(""), S("abcde"), S::npos);
@@ -142,26 +142,35 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), S("abcdeabcdeabcdeabcde"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     test0<S>();
     test1<S>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test0<S>();
     test1<S>();
-    }
+  }
 #endif
 
 #if TEST_STD_VER > 3
-    {   // LWG 2946
+  { // LWG 2946
     std::string s = " !";
     assert(s.rfind({"abc", 1}) == std::string::npos);
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
index ed9d875965321..541f8fbc73f25 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
@@ -17,7 +17,7 @@
 #include "min_allocator.h"
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv, pos));
@@ -27,7 +27,7 @@ test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 }
 
 template <class S, class SV>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
     LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv));
@@ -37,7 +37,7 @@ test(const S& s, SV sv, typename S::size_type x)
 }
 
 template <class S, class SV>
-void test0()
+TEST_CONSTEXPR_CXX20 void test0()
 {
     test(S(""), SV(""), 0, 0);
     test(S(""), SV("abcde"), 0, S::npos);
@@ -122,7 +122,7 @@ void test0()
 }
 
 template <class S, class SV>
-void test1()
+TEST_CONSTEXPR_CXX20 void test1()
 {
     test(S(""), SV(""), 0);
     test(S(""), SV("abcde"), S::npos);
@@ -142,21 +142,30 @@ void test1()
     test(S("abcdeabcdeabcdeabcde"), SV("abcdeabcdeabcdeabcde"), 0);
 }
 
-int main(int, char**)
-{
-    {
+bool test() {
+  {
     typedef std::string S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
 #if TEST_STD_VER >= 11
-    {
+  {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     typedef std::string_view SV;
     test0<S, SV>();
     test1<S, SV>();
-    }
+  }
+#endif
+
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
index 27af66e0670b6..00d29c0de0e38 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
@@ -19,7 +19,7 @@
 #include "min_allocator.h"
 
 template <class S>
-void
+TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::size_type pos, typename S::size_type n)
 {
     if (pos <= s.size())
@@ -47,8 +47,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n)
 #endif
 }
 
-int main(int, char**)
-{
+bool test() {
     {
     typedef std::string S;
     test(S(""), 0, 0);
@@ -174,5 +173,15 @@ int main(int, char**)
     }
 #endif
 
+  return true;
+}
+
+int main(int, char**)
+{
+  test();
+#if TEST_STD_VER > 17
+  // static_assert(test());
+#endif
+
   return 0;
 }


        


More information about the libcxx-commits mailing list