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 @@ -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 @@ -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