tmp/tmprdy74f75/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Comparisons <a id="common.iter.cmp">[[common.iter.cmp]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class I2, sentinel_for<I> S2>
|
| 5 |
+
requires sentinel_for<S, I2>
|
| 6 |
+
friend bool operator==(
|
| 7 |
+
const common_iterator& x, const common_iterator<I2, S2>& y);
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
*Preconditions:* `x.v_.valueless_by_exception()` and
|
| 11 |
+
`y.v_.valueless_by_exception()` are each `false`.
|
| 12 |
+
|
| 13 |
+
*Returns:* `true` if i` == `j, and otherwise
|
| 14 |
+
`get<`i`>(x.v_) == get<`j`>(y.v_)`, where i is `x.v_.index()` and j is
|
| 15 |
+
`y.v_.index()`.
|
| 16 |
+
|
| 17 |
+
``` cpp
|
| 18 |
+
template<class I2, sentinel_for<I> S2>
|
| 19 |
+
requires sentinel_for<S, I2> && equality_comparable_with<I, I2>
|
| 20 |
+
friend bool operator==(
|
| 21 |
+
const common_iterator& x, const common_iterator<I2, S2>& y);
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
*Preconditions:* `x.v_.valueless_by_exception()` and
|
| 25 |
+
`y.v_.valueless_by_exception()` are each `false`.
|
| 26 |
+
|
| 27 |
+
*Returns:* `true` if i and j are each `1`, and otherwise
|
| 28 |
+
`get<`i`>(x.v_) == get<`j`>(y.v_)`, where i is `x.v_.index()` and j is
|
| 29 |
+
`y.v_.index()`.
|
| 30 |
+
|
| 31 |
+
``` cpp
|
| 32 |
+
template<sized_sentinel_for<I> I2, sized_sentinel_for<I> S2>
|
| 33 |
+
requires sized_sentinel_for<S, I2>
|
| 34 |
+
friend iter_difference_t<I2> operator-(
|
| 35 |
+
const common_iterator& x, const common_iterator<I2, S2>& y);
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
*Preconditions:* `x.v_.valueless_by_exception()` and
|
| 39 |
+
`y.v_.valueless_by_exception()` are each `false`.
|
| 40 |
+
|
| 41 |
+
*Returns:* `0` if i and j are each `1`, and otherwise
|
| 42 |
+
`get<`i`>(x.v_) - get<`j`>(y.v_)`, where i is `x.v_.index()` and j is
|
| 43 |
+
`y.v_.index()`.
|
| 44 |
+
|