diff --git a/libcxx/include/__string b/libcxx/include/__string --- a/libcxx/include/__string +++ b/libcxx/include/__string @@ -953,7 +953,7 @@ template 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/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1280,7 +1280,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; @@ -1296,7 +1296,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; @@ -1312,7 +1312,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; @@ -1329,7 +1329,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; @@ -1346,7 +1346,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; @@ -1363,7 +1363,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; @@ -1380,7 +1380,7 @@ __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int > - compare(const _Tp &__t) const; + compare(const _Tp &__t) const _NOEXCEPT; template _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS @@ -3525,7 +3525,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 @@ -3583,7 +3583,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 @@ -3641,7 +3641,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 @@ -3699,7 +3699,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 @@ -3757,7 +3757,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 @@ -3816,7 +3816,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 @@ -3853,7 +3853,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/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -427,7 +427,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 @@ -435,7 +435,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 @@ -459,7 +459,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 @@ -467,7 +467,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 @@ -488,7 +488,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 @@ -496,7 +496,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 @@ -517,7 +517,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 @@ -525,7 +525,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 @@ -549,7 +549,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 @@ -557,7 +557,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 @@ -581,7 +581,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 @@ -589,7 +589,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 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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/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 --- 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 @@ -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/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp +++ b/libcxx/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/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp --- a/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp +++ b/libcxx/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());