tmp/tmprkqo5tww/{from.md → to.md}
RENAMED
|
@@ -48,16 +48,28 @@ template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for
|
|
| 48 |
template<input_range R1, input_range R2, class Pred = ranges::equal_to,
|
| 49 |
class Proj1 = identity, class Proj2 = identity>
|
| 50 |
requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
|
| 51 |
constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {},
|
| 52 |
Proj1 proj1 = {}, Proj2 proj2 = {});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
```
|
| 54 |
|
| 55 |
Let:
|
| 56 |
|
| 57 |
-
- `last2` be `first2 + (last1 - first1)` for the overloads
|
| 58 |
-
|
| 59 |
- `pred` be `equal_to{}` for the overloads with no parameter `pred`;
|
| 60 |
- E be:
|
| 61 |
- `pred(*i, *(first2 + (i - first1)))` for the overloads with no
|
| 62 |
parameter `proj1`;
|
| 63 |
- `invoke(pred, invoke(proj1, *i), invoke(proj2, *(first2 + (i - first1))))`
|
|
@@ -73,20 +85,16 @@ Otherwise return `true` if E holds for every iterator `i` in the range
|
|
| 73 |
*Cpp17RandomAccessIterator* requirements [[random.access.iterators]]
|
| 74 |
and `last1 - first1 != last2 - first2` for the overloads in namespace
|
| 75 |
`std`;
|
| 76 |
- the types of `first1`, `last1`, `first2`, and `last2` pairwise model
|
| 77 |
`sized_sentinel_for` [[iterator.concept.sizedsentinel]] and
|
| 78 |
-
`last1 - first1 != last2 - first2` for the first
|
| 79 |
-
`ranges`,
|
| 80 |
- `R1` and `R2` each model `sized_range` and
|
| 81 |
-
`ranges::distance(r1) != ranges::distance(r2)` for the second
|
| 82 |
-
in namespace `ranges`,
|
| 83 |
|
| 84 |
then no applications of the corresponding predicate and each projection;
|
| 85 |
-
otherwise,
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
min(`last1 - first1`, `last2 - first2`) applications of the
|
| 89 |
-
corresponding predicate and any projections.
|
| 90 |
-
- For the overloads with an `ExecutionPolicy`, 𝑂(min(`last1 - first1`,
|
| 91 |
-
`last2 - first2`)) applications of the corresponding predicate.
|
| 92 |
|
|
|
|
| 48 |
template<input_range R1, input_range R2, class Pred = ranges::equal_to,
|
| 49 |
class Proj1 = identity, class Proj2 = identity>
|
| 50 |
requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
|
| 51 |
constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {},
|
| 52 |
Proj1 proj1 = {}, Proj2 proj2 = {});
|
| 53 |
+
|
| 54 |
+
template<execution-policy Ep, random_access_iterator I1, sized_sentinel_for<I1> S1,
|
| 55 |
+
random_access_iterator I2, sized_sentinel_for<I2> S2,
|
| 56 |
+
class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
|
| 57 |
+
requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
|
| 58 |
+
bool ranges::equal(Ep&& exec, I1 first1, S1 last1, I2 first2, S2 last2,
|
| 59 |
+
Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {});
|
| 60 |
+
template<execution-policy Ep, sized-random-access-range R1, sized-random-access-range R2,
|
| 61 |
+
class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
|
| 62 |
+
requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
|
| 63 |
+
bool ranges::equal(Ep&& exec, R1&& r1, R2&& r2,
|
| 64 |
+
Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {});
|
| 65 |
```
|
| 66 |
|
| 67 |
Let:
|
| 68 |
|
| 69 |
+
- `last2` be `first2 + (last1 - first1)` for the overloads in namespace
|
| 70 |
+
`std` with no parameter `last2`;
|
| 71 |
- `pred` be `equal_to{}` for the overloads with no parameter `pred`;
|
| 72 |
- E be:
|
| 73 |
- `pred(*i, *(first2 + (i - first1)))` for the overloads with no
|
| 74 |
parameter `proj1`;
|
| 75 |
- `invoke(pred, invoke(proj1, *i), invoke(proj2, *(first2 + (i - first1))))`
|
|
|
|
| 85 |
*Cpp17RandomAccessIterator* requirements [[random.access.iterators]]
|
| 86 |
and `last1 - first1 != last2 - first2` for the overloads in namespace
|
| 87 |
`std`;
|
| 88 |
- the types of `first1`, `last1`, `first2`, and `last2` pairwise model
|
| 89 |
`sized_sentinel_for` [[iterator.concept.sizedsentinel]] and
|
| 90 |
+
`last1 - first1 != last2 - first2` for the first and third overloads
|
| 91 |
+
in namespace `ranges`, or
|
| 92 |
- `R1` and `R2` each model `sized_range` and
|
| 93 |
+
`ranges::distance(r1) != ranges::distance(r2)` for the second and
|
| 94 |
+
fourth overloads in namespace `ranges`,
|
| 95 |
|
| 96 |
then no applications of the corresponding predicate and each projection;
|
| 97 |
+
otherwise, at most
|
| 98 |
+
$$\min(\texttt{last1 - first1}, \ \texttt{last2 - first2})$$
|
| 99 |
+
applications of the corresponding predicate and any projections.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|