@@ -22,6 +22,48 @@ type, which in turn makes `S::size_type(std::size_t(-1))` not equal to `S::size_
2222<p />
2323Do we want to restore the old return values?
2424</p >
25+
26+ <superseded >
27+ <p >
28+ This wording is relative to <paper num =" N5008" />.
29+ </p >
30+ <ol >
31+
32+ <li ><p >Modify <sref ref =" [string.find]" /> as indicated:</p >
33+
34+ <blockquote >
35+ <pre >
36+ template< class T>
37+ constexpr size_type find(const T& t, size_type pos = 0) const noexcept(<i >see below</i >);
38+ [… ]
39+ template< class T>
40+ constexpr size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept(<i >see below</i >);
41+ </pre >
42+ <blockquote >
43+ <p >
44+ -2- <i >Constraints</i >: [… ]
45+ <p />
46+ -3- <i >Effects</i >: Let <tt ><i >G</i ></tt > be the name of the function. Equivalent to:
47+ </p >
48+ <blockquote ><pre >
49+ basic_string_view< charT, traits> s = *this, sv = t;
50+ <del >return s.<i >G</i >(sv, pos);</del >
51+ <ins >if (auto result = s.<i >G</i >(sv, pos); result == size_t(-1))
52+ return npos;
53+ else
54+ return result;</ins >
55+ </pre ></blockquote >
56+ </blockquote >
57+ </blockquote >
58+ </li >
59+ </ol >
60+ </superseded >
61+
62+ <note >2025-06-10, reflector discussion</note >
63+ <p >
64+ During reflector discussion of this issue there was a preference to adjust the
65+ proposed wording to use `s.npos` instead of `size_t(-1)`.
66+ </p >
2567</discussion >
2668
2769<resolution >
@@ -49,7 +91,7 @@ template<class T>
4991<blockquote ><pre >
5092basic_string_view< charT, traits> s = *this, sv = t;
5193<del >return s.<i >G</i >(sv, pos);</del >
52- <ins >if (auto result = s.<i >G</i >(sv, pos); result == size_t(-1) )
94+ <ins >if (auto result = s.<i >G</i >(sv, pos); result == s.npos )
5395 return npos;
5496else
5597 return result;</ins >
0 commit comments