tmp/tmpyo03juu0/{from.md → to.md}
RENAMED
|
@@ -1,24 +1,27 @@
|
|
| 1 |
#### `equal_range` <a id="equal.range">[[equal.range]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
template<class ForwardIterator, class T>
|
| 5 |
constexpr pair<ForwardIterator, ForwardIterator>
|
| 6 |
equal_range(ForwardIterator first,
|
| 7 |
ForwardIterator last, const T& value);
|
| 8 |
|
| 9 |
-
template<class ForwardIterator, class T
|
|
|
|
| 10 |
constexpr pair<ForwardIterator, ForwardIterator>
|
| 11 |
equal_range(ForwardIterator first,
|
| 12 |
ForwardIterator last, const T& value,
|
| 13 |
Compare comp);
|
| 14 |
|
| 15 |
-
template<forward_iterator I, sentinel_for<I> S, class
|
|
|
|
| 16 |
indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
|
| 17 |
constexpr subrange<I>
|
| 18 |
ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {});
|
| 19 |
-
template<forward_range R, class
|
|
|
|
| 20 |
indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
|
| 21 |
ranges::less>
|
| 22 |
constexpr borrowed_subrange_t<R>
|
| 23 |
ranges::equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {});
|
| 24 |
```
|
|
@@ -28,11 +31,11 @@ parameters by those names.
|
|
| 28 |
|
| 29 |
*Preconditions:* The elements `e` of \[`first`, `last`) are partitioned
|
| 30 |
with respect to the expressions
|
| 31 |
`bool(invoke(comp, invoke(proj, e), value))` and
|
| 32 |
`!bool(invoke(comp, value, invoke(proj, e)))`. Also, for all elements
|
| 33 |
-
`e` of
|
| 34 |
`!bool(comp(value, e))` for the overloads in namespace `std`.
|
| 35 |
|
| 36 |
*Returns:*
|
| 37 |
|
| 38 |
- For the overloads in namespace `std`:
|
|
|
|
| 1 |
#### `equal_range` <a id="equal.range">[[equal.range]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
template<class ForwardIterator, class T = iterator_traits<ForwardIterator>::value_type>
|
| 5 |
constexpr pair<ForwardIterator, ForwardIterator>
|
| 6 |
equal_range(ForwardIterator first,
|
| 7 |
ForwardIterator last, const T& value);
|
| 8 |
|
| 9 |
+
template<class ForwardIterator, class T = iterator_traits<ForwardIterator>::value_type,
|
| 10 |
+
class Compare>
|
| 11 |
constexpr pair<ForwardIterator, ForwardIterator>
|
| 12 |
equal_range(ForwardIterator first,
|
| 13 |
ForwardIterator last, const T& value,
|
| 14 |
Compare comp);
|
| 15 |
|
| 16 |
+
template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
|
| 17 |
+
class T = projected_value_t<I, Proj>,
|
| 18 |
indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
|
| 19 |
constexpr subrange<I>
|
| 20 |
ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {});
|
| 21 |
+
template<forward_range R, class Proj = identity,
|
| 22 |
+
class T = projected_value_t<iterator_t<R>, Proj>,
|
| 23 |
indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
|
| 24 |
ranges::less>
|
| 25 |
constexpr borrowed_subrange_t<R>
|
| 26 |
ranges::equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {});
|
| 27 |
```
|
|
|
|
| 31 |
|
| 32 |
*Preconditions:* The elements `e` of \[`first`, `last`) are partitioned
|
| 33 |
with respect to the expressions
|
| 34 |
`bool(invoke(comp, invoke(proj, e), value))` and
|
| 35 |
`!bool(invoke(comp, value, invoke(proj, e)))`. Also, for all elements
|
| 36 |
+
`e` of \[`first`, `last`), `bool(comp(e, value))` implies
|
| 37 |
`!bool(comp(value, e))` for the overloads in namespace `std`.
|
| 38 |
|
| 39 |
*Returns:*
|
| 40 |
|
| 41 |
- For the overloads in namespace `std`:
|