tmp/tmpe7u3mr0g/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Concept <a id="iterator.concept.sentinel">[[iterator.concept.sentinel]]</a>
|
| 2 |
+
|
| 3 |
+
The `sentinel_for` concept specifies the relationship between an
|
| 4 |
+
`input_or_output_iterator` type and a `semiregular` type whose values
|
| 5 |
+
denote a range.
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
template<class S, class I>
|
| 9 |
+
concept sentinel_for =
|
| 10 |
+
semiregular<S> &&
|
| 11 |
+
input_or_output_iterator<I> &&
|
| 12 |
+
weakly-equality-comparable-with<S, I>; // See [concept.equalitycomparable]
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
Let `s` and `i` be values of type `S` and `I` such that \[`i`, `s`)
|
| 16 |
+
denotes a range. Types `S` and `I` model `sentinel_for<S, I>` only if
|
| 17 |
+
|
| 18 |
+
- `i == s` is well-defined.
|
| 19 |
+
- If `bool(i != s)` then `i` is dereferenceable and \[`++i`, `s`)
|
| 20 |
+
denotes a range.
|
| 21 |
+
|
| 22 |
+
The domain of `==` is not static. Given an iterator `i` and sentinel `s`
|
| 23 |
+
such that \[`i`, `s`) denotes a range and `i != s`, `i` and `s` are not
|
| 24 |
+
required to continue to denote a range after incrementing any other
|
| 25 |
+
iterator equal to `i`. Consequently, `i == s` is no longer required to
|
| 26 |
+
be well-defined.
|
| 27 |
+
|