Removed noexcept from string_view::compare that may throw.

One overload of string_view::compare calls substr internally,
which may throw. This makes compare potentially throwing.

Fixes https://github.com/boostorg/utility/issues/94.
This commit is contained in:
Andrey Semashev 2022-05-03 00:42:20 +03:00
parent 7ac95c156c
commit 0c1d01d30a

View File

@ -201,7 +201,7 @@ namespace boost {
}
BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, basic_string_view x)
const BOOST_NOEXCEPT {
const {
return substr(pos1, n1).compare(x);
}