|
6 | 6 | <section><sref ref="[range.iter.op.advance]"/><sref ref="[range.iter.op.next]"/></section> |
7 | 7 | <submitter>Jiang An</submitter> |
8 | 8 | <date>09 Jan 2026</date> |
9 | | -<priority>99</priority> |
| 9 | +<priority>3</priority> |
10 | 10 |
|
11 | 11 | <discussion> |
12 | 12 | <p> |
@@ -57,9 +57,25 @@ wrapping iterators that trigger ADL for the value type like the `FwdIter` in thi |
57 | 57 | are common in standard library implementations, so ambiguity can be easily raised from |
58 | 58 | containers with such `OmniConv` being their element type. |
59 | 59 | </p> |
60 | | -</discussion> |
61 | 60 |
|
62 | | -<resolution> |
| 61 | +<note>2026-02-20; Reflector poll.</note> |
| 62 | +<p> |
| 63 | +Set priority to 3 after reflector poll. |
| 64 | +</p> |
| 65 | +<p> |
| 66 | +The type in the example is basically a `std::any` that additionally type-erases |
| 67 | +equality. That causes a problem for templated iterators that have their |
| 68 | +value type's namespace as an associated namespace for ADL. |
| 69 | +</p> |
| 70 | +<p> |
| 71 | +Instead of allowing integers to be sentinels in general but just restricting |
| 72 | +them from being used with these overloads, we could just change the concept |
| 73 | +so that integers do not model `sentinel_for`. |
| 74 | +That's similar to what we did for `span`'s constructor which has a similar |
| 75 | +problem (though that one's more aggressive due to compatibility constraints). |
| 76 | +</p> |
| 77 | + |
| 78 | +<superseded> |
63 | 79 | <p> |
64 | 80 | This wording is relative to <paper num="N5032"/>. |
65 | 81 | </p> |
@@ -146,6 +162,32 @@ template<input_or_output_iterator I, <del>sentinel_for<I></del><ins>cla |
146 | 162 |
|
147 | 163 | </ol> |
148 | 164 |
|
| 165 | +</superseded> |
| 166 | + |
| 167 | +<note>2026-02-20; Jonathan provides new wording</note> |
| 168 | + |
| 169 | +</discussion> |
| 170 | + |
| 171 | +<resolution> |
| 172 | +<p> |
| 173 | +This wording is relative to <paper num="N5032"/>. |
| 174 | +</p> |
| 175 | + |
| 176 | +<ol> |
| 177 | +<li><p>Modify <sref ref="[iterator.concept.sentinel]"/> as indicated:</p> |
| 178 | + |
| 179 | +<blockquote> |
| 180 | +<pre> |
| 181 | +template<class S, class I> |
| 182 | + concept sentinel_for = |
| 183 | + semiregular<S> && |
| 184 | + <ins>!<i>is-integer-like</i><S> &&</ins> |
| 185 | + input_or_output_iterator<I> && |
| 186 | + weakly-equality-comparable-with<S, I>; <i>// see <sref ref="[concept.equalitycomparable]"/></i> |
| 187 | +</pre> |
| 188 | +</blockquote> |
| 189 | +</li> |
| 190 | +</ol> |
149 | 191 |
|
150 | 192 | </resolution> |
151 | 193 |
|
|
0 commit comments