tmp/tmpcmaudowp/{from.md → to.md}
RENAMED
|
@@ -1,61 +1,91 @@
|
|
| 1 |
#### `is_sorted` <a id="is.sorted">[[is.sorted]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ForwardIterator>
|
| 5 |
-
bool is_sorted(ForwardIterator first, ForwardIterator last);
|
| 6 |
```
|
| 7 |
|
| 8 |
-
*
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 12 |
bool is_sorted(ExecutionPolicy&& exec,
|
| 13 |
ForwardIterator first, ForwardIterator last);
|
| 14 |
```
|
| 15 |
|
| 16 |
-
*
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
template<class ForwardIterator, class Compare>
|
| 21 |
-
bool is_sorted(ForwardIterator first, ForwardIterator last,
|
| 22 |
Compare comp);
|
| 23 |
```
|
| 24 |
|
| 25 |
-
*
|
|
|
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
template<class ExecutionPolicy, class ForwardIterator, class Compare>
|
| 29 |
bool is_sorted(ExecutionPolicy&& exec,
|
| 30 |
ForwardIterator first, ForwardIterator last,
|
| 31 |
Compare comp);
|
| 32 |
```
|
| 33 |
|
| 34 |
-
*
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
-
is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last, comp) == last
|
| 38 |
```
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
``` cpp
|
| 41 |
template<class ForwardIterator>
|
| 42 |
-
|
|
|
|
| 43 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 44 |
-
ForwardIterator
|
|
|
|
| 45 |
ForwardIterator first, ForwardIterator last);
|
| 46 |
|
| 47 |
template<class ForwardIterator, class Compare>
|
| 48 |
-
|
|
|
|
| 49 |
Compare comp);
|
| 50 |
template<class ExecutionPolicy, class ForwardIterator, class Compare>
|
| 51 |
-
ForwardIterator
|
|
|
|
| 52 |
ForwardIterator first, ForwardIterator last,
|
| 53 |
Compare comp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
```
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
| 59 |
|
| 60 |
*Complexity:* Linear.
|
| 61 |
|
|
|
|
| 1 |
#### `is_sorted` <a id="is.sorted">[[is.sorted]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ForwardIterator>
|
| 5 |
+
constexpr bool is_sorted(ForwardIterator first, ForwardIterator last);
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Effects:* Equivalent to: `return is_sorted_until(first, last) == last;`
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 12 |
bool is_sorted(ExecutionPolicy&& exec,
|
| 13 |
ForwardIterator first, ForwardIterator last);
|
| 14 |
```
|
| 15 |
|
| 16 |
+
*Effects:* Equivalent to:
|
| 17 |
+
|
| 18 |
+
``` cpp
|
| 19 |
+
return is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last) == last;
|
| 20 |
+
```
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
template<class ForwardIterator, class Compare>
|
| 24 |
+
constexpr bool is_sorted(ForwardIterator first, ForwardIterator last,
|
| 25 |
Compare comp);
|
| 26 |
```
|
| 27 |
|
| 28 |
+
*Effects:* Equivalent to:
|
| 29 |
+
`return is_sorted_until(first, last, comp) == last;`
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
template<class ExecutionPolicy, class ForwardIterator, class Compare>
|
| 33 |
bool is_sorted(ExecutionPolicy&& exec,
|
| 34 |
ForwardIterator first, ForwardIterator last,
|
| 35 |
Compare comp);
|
| 36 |
```
|
| 37 |
|
| 38 |
+
*Effects:* Equivalent to:
|
| 39 |
|
| 40 |
``` cpp
|
| 41 |
+
return is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last, comp) == last;
|
| 42 |
```
|
| 43 |
|
| 44 |
+
``` cpp
|
| 45 |
+
template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
|
| 46 |
+
indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
|
| 47 |
+
constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {});
|
| 48 |
+
template<forward_range R, class Proj = identity,
|
| 49 |
+
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
|
| 50 |
+
constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {});
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
*Effects:* Equivalent to:
|
| 54 |
+
`return ranges::is_sorted_until(first, last, comp, proj) == last;`
|
| 55 |
+
|
| 56 |
``` cpp
|
| 57 |
template<class ForwardIterator>
|
| 58 |
+
constexpr ForwardIterator
|
| 59 |
+
is_sorted_until(ForwardIterator first, ForwardIterator last);
|
| 60 |
template<class ExecutionPolicy, class ForwardIterator>
|
| 61 |
+
ForwardIterator
|
| 62 |
+
is_sorted_until(ExecutionPolicy&& exec,
|
| 63 |
ForwardIterator first, ForwardIterator last);
|
| 64 |
|
| 65 |
template<class ForwardIterator, class Compare>
|
| 66 |
+
constexpr ForwardIterator
|
| 67 |
+
is_sorted_until(ForwardIterator first, ForwardIterator last,
|
| 68 |
Compare comp);
|
| 69 |
template<class ExecutionPolicy, class ForwardIterator, class Compare>
|
| 70 |
+
ForwardIterator
|
| 71 |
+
is_sorted_until(ExecutionPolicy&& exec,
|
| 72 |
ForwardIterator first, ForwardIterator last,
|
| 73 |
Compare comp);
|
| 74 |
+
|
| 75 |
+
template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
|
| 76 |
+
indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
|
| 77 |
+
constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {});
|
| 78 |
+
template<forward_range R, class Proj = identity,
|
| 79 |
+
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
|
| 80 |
+
constexpr borrowed_iterator_t<R>
|
| 81 |
+
ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {});
|
| 82 |
```
|
| 83 |
|
| 84 |
+
Let `comp` be `less{}` and `proj` be `identity{}` for the overloads with
|
| 85 |
+
no parameters by those names.
|
| 86 |
+
|
| 87 |
+
*Returns:* The last iterator `i` in \[`first`, `last`\] for which the
|
| 88 |
+
range \[`first`, `i`) is sorted with respect to `comp` and `proj`.
|
| 89 |
|
| 90 |
*Complexity:* Linear.
|
| 91 |
|