According to [string.find#1.2] and [string.find#1.3]:
Each member function of the form
constexpr size_type F(const charT* s, size_type pos) const;
has effects equivalent to:
return F(basic_string_view<charT, traits>(s), pos);
Each member function of the form
constexpr size_type F(const charT* s, size_type pos, size_type n) const;
has effects equivalent to:
return F(basic_string_view<charT, traits>(s, n), pos);
Those two find
functions are not declared as noexcept
, but all of three compiler vendors didn't follow the rule, they just implement it as noexcept
.
What is the reason behind this?