tmp/tmp1du9g5h8/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Comparisons <a id="counted.iter.cmp">[[counted.iter.cmp]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<common_with<I> I2>
|
| 5 |
+
friend constexpr bool operator==(
|
| 6 |
+
const counted_iterator& x, const counted_iterator<I2>& y);
|
| 7 |
+
```
|
| 8 |
+
|
| 9 |
+
*Preconditions:* `x` and `y` refer to elements of the same
|
| 10 |
+
sequence [[counted.iterator]].
|
| 11 |
+
|
| 12 |
+
*Effects:* Equivalent to: `return x.length == y.length;`
|
| 13 |
+
|
| 14 |
+
``` cpp
|
| 15 |
+
friend constexpr bool operator==(
|
| 16 |
+
const counted_iterator& x, default_sentinel_t);
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
*Effects:* Equivalent to: `return x.length == 0;`
|
| 20 |
+
|
| 21 |
+
``` cpp
|
| 22 |
+
template<common_with<I> I2>
|
| 23 |
+
friend constexpr strong_ordering operator<=>(
|
| 24 |
+
const counted_iterator& x, const counted_iterator<I2>& y);
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
*Preconditions:* `x` and `y` refer to elements of the same
|
| 28 |
+
sequence [[counted.iterator]].
|
| 29 |
+
|
| 30 |
+
*Effects:* Equivalent to: `return y.length <=> x.length;`
|
| 31 |
+
|
| 32 |
+
[*Note 1*: The argument order in the *Effects:* element is reversed
|
| 33 |
+
because `length` counts down, not up. — *end note*]
|
| 34 |
+
|