[libc++] Add `noexcept` to `string::find` and similar members.

Adds `noexcept` to `string_view`/`string::find` and similar members
(`rfind`, etc.). See discussion in D95251. Refs D95821.

Reviewed By: curdeius, ldionne

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

GitOrigin-RevId: dea74b2820612ecca967528f7f2bbcc6d05801fe
diff --git a/include/__string b/include/__string
index d8b672e..5b340d0 100644
--- a/include/__string
+++ b/include/__string
@@ -953,7 +953,7 @@
 template <class _CharT, class _Traits>
 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT *
 __search_substring(const _CharT *__first1, const _CharT *__last1,
-                   const _CharT *__first2, const _CharT *__last2) {
+                   const _CharT *__first2, const _CharT *__last2) _NOEXCEPT {
   // Take advantage of knowing source and pattern lengths.
   // Stop short when source is smaller than pattern.
   const ptrdiff_t __len2 = __last2 - __first2;
diff --git a/include/string b/include/string
index 687795c..b052164 100644
--- a/include/string
+++ b/include/string
@@ -262,49 +262,49 @@
 
     size_type find(const basic_string& str, size_type pos = 0) const noexcept;
     template <class T>
-        size_type find(const T& t, size_type pos = 0) const;  // C++17
+        size_type find(const T& t, size_type pos = 0) const noexcept; // C++17, noexcept as an extension
     size_type find(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type find(const value_type* s, size_type pos = 0) const noexcept;
     size_type find(value_type c, size_type pos = 0) const noexcept;
 
     size_type rfind(const basic_string& str, size_type pos = npos) const noexcept;
     template <class T>
-        size_type rfind(const T& t, size_type pos = npos) const;  // C++17
+        size_type rfind(const T& t, size_type pos = npos) const noexcept; // C++17, noexcept as an extension
     size_type rfind(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type rfind(const value_type* s, size_type pos = npos) const noexcept;
     size_type rfind(value_type c, size_type pos = npos) const noexcept;
 
     size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept;
     template <class T>
-        size_type find_first_of(const T& t, size_type pos = 0) const; // C++17
+        size_type find_first_of(const T& t, size_type pos = 0) const noexcept; // C++17, noexcept as an extension
     size_type find_first_of(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type find_first_of(const value_type* s, size_type pos = 0) const noexcept;
     size_type find_first_of(value_type c, size_type pos = 0) const noexcept;
 
     size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept;
     template <class T>
-        size_type find_last_of(const T& t, size_type pos = npos) const noexcept;  // C++17
+        size_type find_last_of(const T& t, size_type pos = npos) const noexcept noexcept; // C++17, noexcept as an extension
     size_type find_last_of(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type find_last_of(const value_type* s, size_type pos = npos) const noexcept;
     size_type find_last_of(value_type c, size_type pos = npos) const noexcept;
 
     size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept;
     template <class T>
-        size_type find_first_not_of(const T& t, size_type pos = 0) const; // C++17
+        size_type find_first_not_of(const T& t, size_type pos = 0) const noexcept; // C++17, noexcept as an extension
     size_type find_first_not_of(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type find_first_not_of(const value_type* s, size_type pos = 0) const noexcept;
     size_type find_first_not_of(value_type c, size_type pos = 0) const noexcept;
 
     size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept;
     template <class T>
-        size_type find_last_not_of(const T& t, size_type pos = npos) const; // C++17
+        size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept; // C++17, noexcept as an extension
     size_type find_last_not_of(const value_type* s, size_type pos, size_type n) const noexcept;
     size_type find_last_not_of(const value_type* s, size_type pos = npos) const noexcept;
     size_type find_last_not_of(value_type c, size_type pos = npos) const noexcept;
 
     int compare(const basic_string& str) const noexcept;
     template <class T>
-        int compare(const T& t) const noexcept;  // C++17
+        int compare(const T& t) const noexcept;  // C++17, noexcept as an extension
     int compare(size_type pos1, size_type n1, const basic_string& str) const;
     template <class T>
         int compare(size_type pos1, size_type n1, const T& t) const;  // C++17
@@ -1284,7 +1284,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              find(const _Tp& __t, size_type __pos = 0) const;
+              find(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
     size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
@@ -1300,7 +1300,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              rfind(const _Tp& __t, size_type __pos = npos) const;
+              rfind(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
     size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
@@ -1316,7 +1316,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              find_first_of(const _Tp& __t, size_type __pos = 0) const;
+              find_first_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
     size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
@@ -1333,7 +1333,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              find_last_of(const _Tp& __t, size_type __pos = npos) const;
+              find_last_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
     size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
@@ -1350,7 +1350,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              find_first_not_of(const _Tp &__t, size_type __pos = 0) const;
+              find_first_not_of(const _Tp &__t, size_type __pos = 0) const _NOEXCEPT;
     size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
@@ -1367,7 +1367,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
-              find_last_not_of(const _Tp& __t, size_type __pos = npos) const;
+              find_last_not_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
     size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
@@ -1384,7 +1384,7 @@
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             int
         >
-        compare(const _Tp &__t) const;
+        compare(const _Tp &__t) const _NOEXCEPT;
 
     template <class _Tp>
     _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
@@ -3543,7 +3543,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::find(const _Tp &__t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_find<value_type, size_type, traits_type, npos>
@@ -3601,7 +3601,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::rfind(const _Tp& __t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_rfind<value_type, size_type, traits_type, npos>
@@ -3659,7 +3659,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_find_first_of<value_type, size_type, traits_type, npos>
@@ -3717,7 +3717,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_find_last_of<value_type, size_type, traits_type, npos>
@@ -3775,7 +3775,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_find_first_not_of<value_type, size_type, traits_type, npos>
@@ -3834,7 +3834,7 @@
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
 >
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t,
-                                                size_type __pos) const
+                                                size_type __pos) const _NOEXCEPT
 {
     __self_view __sv = __t;
     return __str_find_last_not_of<value_type, size_type, traits_type, npos>
@@ -3871,7 +3871,7 @@
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
     int
 >
-basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const
+basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCEPT
 {
     __self_view __sv = __t;
     size_t __lhs_sz = size();
diff --git a/include/string_view b/include/string_view
index bc0245c..f8c6357 100644
--- a/include/string_view
+++ b/include/string_view
@@ -119,28 +119,28 @@
                             const charT* s, size_type n2) const;
       constexpr size_type find(basic_string_view s, size_type pos = 0) const noexcept;
       constexpr size_type find(charT c, size_type pos = 0) const noexcept;
-      constexpr size_type find(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type find(const charT* s, size_type pos = 0) const;
+      constexpr size_type find(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type find(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
       constexpr size_type rfind(basic_string_view s, size_type pos = npos) const noexcept;
       constexpr size_type rfind(charT c, size_type pos = npos) const noexcept;
-      constexpr size_type rfind(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type rfind(const charT* s, size_type pos = npos) const;
+      constexpr size_type rfind(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type rfind(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension
       constexpr size_type find_first_of(basic_string_view s, size_type pos = 0) const noexcept;
       constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept;
-      constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type find_first_of(const charT* s, size_type pos = 0) const;
+      constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type find_first_of(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
       constexpr size_type find_last_of(basic_string_view s, size_type pos = npos) const noexcept;
       constexpr size_type find_last_of(charT c, size_type pos = npos) const noexcept;
-      constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type find_last_of(const charT* s, size_type pos = npos) const;
+      constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type find_last_of(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension
       constexpr size_type find_first_not_of(basic_string_view s, size_type pos = 0) const noexcept;
       constexpr size_type find_first_not_of(charT c, size_type pos = 0) const noexcept;
-      constexpr size_type find_first_not_of(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const;
+      constexpr size_type find_first_not_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
       constexpr size_type find_last_not_of(basic_string_view s, size_type pos = npos) const noexcept;
       constexpr size_type find_last_not_of(charT c, size_type pos = npos) const noexcept;
-      constexpr size_type find_last_not_of(const charT* s, size_type pos, size_type n) const;
-      constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const;
+      constexpr size_type find_last_not_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
+      constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension
 
       constexpr bool starts_with(basic_string_view s) const noexcept; // C++20
       constexpr bool starts_with(charT c) const noexcept;             // C++20
@@ -431,7 +431,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
         return __str_find<value_type, size_type, traits_type, npos>
@@ -439,7 +439,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find(const _CharT* __s, size_type __pos = 0) const
+    size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::find(): received nullptr");
         return __str_find<value_type, size_type, traits_type, npos>
@@ -463,7 +463,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
         return __str_rfind<value_type, size_type, traits_type, npos>
@@ -471,7 +471,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type rfind(const _CharT* __s, size_type __pos=npos) const
+    size_type rfind(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr");
         return __str_rfind<value_type, size_type, traits_type, npos>
@@ -492,7 +492,7 @@
     { return find(__c, __pos); }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
         return __str_find_first_of<value_type, size_type, traits_type, npos>
@@ -500,7 +500,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_first_of(const _CharT* __s, size_type __pos=0) const
+    size_type find_first_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr");
         return __str_find_first_of<value_type, size_type, traits_type, npos>
@@ -521,7 +521,7 @@
     { return rfind(__c, __pos); }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
         return __str_find_last_of<value_type, size_type, traits_type, npos>
@@ -529,7 +529,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_last_of(const _CharT* __s, size_type __pos=npos) const
+    size_type find_last_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr");
         return __str_find_last_of<value_type, size_type, traits_type, npos>
@@ -553,7 +553,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
@@ -561,7 +561,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const
+    size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
@@ -585,7 +585,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
@@ -593,7 +593,7 @@
     }
 
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-    size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const
+    size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
         _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
diff --git a/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
index eac5d0b..072f062 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
@@ -29,6 +29,7 @@
 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));
 }
 
diff --git a/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
index 279ae30..76237cd 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
@@ -29,6 +29,7 @@
 void
 test(const S& s, const S& str, int x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
     assert(sign(s.compare(str)) == sign(x));
 }
 
diff --git a/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
index f2cec20..fc145f8 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
@@ -29,6 +29,7 @@
 void
 test(const S& s, SV sv, int x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.compare(sv));
     assert(sign(s.compare(sv)) == sign(x));
 }
 
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
index 9d2d0f7..bf688ef 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
     assert(s.find_first_not_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c));
     assert(s.find_first_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
index c1556b1..37ae43e 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
index de62909..d4776a0 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
     assert(s.find_first_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
index 7f12ab1..554b4a6 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str));
     assert(s.find_first_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
index eea4722..51cef0f 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_first_not_of(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(sv));
     assert(s.find_first_not_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
index 9e8dfda..7ba1c61 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
     assert(s.find_first_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c));
     assert(s.find_first_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
index fd37402..a54f480 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
index 1454716..e95066a 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
     assert(s.find_first_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
index 1ae2123..d30254a 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
index 33bc971..7570c33 100644
--- a/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_first_of(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(sv));
     assert(s.find_first_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
index c295025..25120bb 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
     assert(s.find_last_not_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c));
     assert(s.find_last_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
index a5ac3e8..56c0ee7 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 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));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
index 5bc5a8c..0b4eb96 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
     assert(s.find_last_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
index 8232612..1c2bd12 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
index 7952906..9b7d8d0 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_last_not_of(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(sv));
     assert(s.find_last_not_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
index 8ea48fe..3273ecd 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
     assert(s.find_last_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c));
     assert(s.find_last_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
index 8045ac0..a86c104 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
index 855139f..c3420d5 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
     assert(s.find_last_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
index f3ddb46..a6e8d1a 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
index 63f03e7..a44ddd9 100644
--- a/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find_last_of(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(sv));
     assert(s.find_last_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
index 6f92ef1..bbd8461 100644
--- a/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(c, pos));
     assert(s.find(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + 1 <= s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(c));
     assert(s.find(c) == x);
     if (x != S::npos)
         assert(0 <= x && x + 1 <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
index 1cc6cb9..c06797a 100644
--- a/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
     {
@@ -33,6 +34,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
     {
diff --git a/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
index d640be7..3ca6b3a 100644
--- a/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos, n));
     assert(s.find(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x + n <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
index e8a91dd..3aef261 100644
--- a/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + str.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
index 08baa74..c74b5a4 100644
--- a/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(sv, pos));
     assert(s.find(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + sv.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(sv));
     assert(s.find(sv) == x);
     if (x != S::npos)
         assert(0 <= x && x + sv.size() <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
index e3484bd..49a5fbc 100644
--- a/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c, pos));
     assert(s.rfind(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + 1 <= s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c));
     assert(s.rfind(c) == x);
     if (x != S::npos)
         assert(x + 1 <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
index b77d808..4006161 100644
--- a/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
     {
@@ -33,6 +34,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
     {
diff --git a/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
index 8e4e32e..2bcb486 100644
--- a/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
     assert(s.rfind(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x + n <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
index 74cfb02..a1932c7 100644
--- a/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + str.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());
diff --git a/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
index 7d0c4ff..ed9d875 100644
--- a/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv, pos));
     assert(s.rfind(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + sv.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, SV sv, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv));
     assert(s.rfind(sv) == x);
     if (x != S::npos)
         assert(0 <= x && x + sv.size() <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
index 15dff2e..78c70c3 100644
--- a/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(c, pos));
     assert(s.find(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + 1 <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
index 1b050dd..351eb1d 100644
--- a/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
     assert(s.find_first_not_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c));
     assert(s.find_first_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
index 535860e..8ca9d91 100644
--- a/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
index 18fdda9..d6f3a3f 100644
--- a/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
     assert(s.find_first_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
index 1408ffb..163ab73 100644
--- a/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
@@ -19,6 +19,7 @@
 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));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
index b1bda4e..e312ae8 100644
--- a/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
     assert(s.find_first_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
index ee50e0c..4ef219d 100644
--- a/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
index 5e35f4c..a2816d6 100644
--- a/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
     assert(s.find_first_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
index aad1094..1752f3b 100644
--- a/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
@@ -19,6 +19,7 @@
 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));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -28,6 +29,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
index c4c7fa4..d2cf8d5 100644
--- a/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
     assert(s.find_last_not_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c));
     assert(s.find_last_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
index 48574cd..51f8847 100644
--- a/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
index 3e46ed8..ceb0e13 100644
--- a/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
     assert(s.find_last_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
index 289d5e3..2c57a46 100644
--- a/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
@@ -19,6 +19,7 @@
 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));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -28,6 +29,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
index 0f8c6b0..5cdae5c 100644
--- a/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
     assert(s.find_last_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c));
     assert(s.find_last_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
index 4b2e8c8..e6e78ba 100644
--- a/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,6 +31,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
index 318b211..7f6001e 100644
--- a/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
     assert(s.find_last_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
index c60fc00..aa8665f 100644
--- a/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
@@ -19,6 +19,7 @@
 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));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -28,6 +29,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
index 67c01ec..79f6bc3 100644
--- a/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
@@ -21,6 +21,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
     {
@@ -33,6 +34,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
     {
diff --git a/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
index dd5536b..d167b7d 100644
--- a/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
@@ -21,6 +21,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos, n));
     assert(s.find(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x + n <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
index 6f4aa90..86790dc 100644
--- a/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + str.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp b/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
index e8229e1..38236b8 100644
--- a/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
@@ -20,6 +20,7 @@
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c, pos));
     assert(s.rfind(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + 1 <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c));
     assert(s.rfind(c) == x);
     if (x != S::npos)
         assert(x + 1 <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp b/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
index 691fab4..ebc8f61 100644
--- a/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
@@ -20,6 +20,7 @@
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
     {
@@ -32,6 +33,7 @@
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
     {
diff --git a/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp b/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
index 39a295d..de54121 100644
--- a/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
@@ -20,6 +20,7 @@
 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)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
     assert(s.rfind(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x + n <= s.size());
diff --git a/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp b/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
index 7607bcf..bce0225 100644
--- a/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
+++ b/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
@@ -20,6 +20,7 @@
 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));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + str.size() <= s.size());
@@ -29,6 +30,7 @@
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
+    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());