diff --git a/groups/bsl/bslstl/bslstl_string.h b/groups/bsl/bslstl/bslstl_string.h index eabc973d94..5ad3b04958 100644 --- a/groups/bsl/bslstl/bslstl_string.h +++ b/groups/bsl/bslstl/bslstl_string.h @@ -2901,8 +2901,7 @@ class basic_string /// Return `true` if this view contains with the specified /// `characterString`, and `false` otherwise. - bool contains(const CHAR_TYPE* characterString) - const BSLS_KEYWORD_NOEXCEPT; + bool contains(const CHAR_TYPE* characterString) const; /// Return `true` if the length of this string is equal to or greater /// than the length of the specified `characterString` and the first @@ -7161,7 +7160,7 @@ bool basic_string::contains( template BSLS_PLATFORM_AGGRESSIVE_INLINE bool basic_string::contains( - const CHAR_TYPE* characterString) const BSLS_KEYWORD_NOEXCEPT + const CHAR_TYPE* characterString) const { BSLS_ASSERT_SAFE(characterString); return npos != find(characterString); diff --git a/groups/bsl/bslstl/bslstl_stringview.h b/groups/bsl/bslstl/bslstl_stringview.h index 50598d729e..a4677f6a1a 100644 --- a/groups/bsl/bslstl/bslstl_stringview.h +++ b/groups/bsl/bslstl/bslstl_stringview.h @@ -737,8 +737,7 @@ class basic_string_view { /// Return `true` if this view contains with the specified /// `characterString`, and `false` otherwise. BSLS_KEYWORD_CONSTEXPR_CPP17 - bool contains(const CHAR_TYPE* characterString) - const BSLS_KEYWORD_NOEXCEPT; + bool contains(const CHAR_TYPE* characterString) const; /// Return `true` if this view starts with the specified `subview`, and /// `false` otherwise. See {Lexicographical Comparisons}. @@ -1943,7 +1942,7 @@ template BSLS_PLATFORM_AGGRESSIVE_INLINE BSLS_KEYWORD_CONSTEXPR_CPP17 bool basic_string_view::contains( - const CHAR_TYPE* characterString) const BSLS_KEYWORD_NOEXCEPT + const CHAR_TYPE* characterString) const { BSLS_ASSERT_SAFE(characterString); return npos != find(characterString);