From Jason Turner

[is.sorted]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmptq94rs9t/{from.md → to.md} +32 -2
tmp/tmptq94rs9t/{from.md → to.md} RENAMED
@@ -5,27 +5,57 @@ template<class ForwardIterator>
5
  bool is_sorted(ForwardIterator first, ForwardIterator last);
6
  ```
7
 
8
  *Returns:* `is_sorted_until(first, last) == last`
9
 
 
 
 
 
 
 
 
 
 
10
  ``` cpp
11
  template<class ForwardIterator, class Compare>
12
  bool is_sorted(ForwardIterator first, ForwardIterator last,
13
  Compare comp);
14
  ```
15
 
16
  *Returns:* `is_sorted_until(first, last, comp) == last`
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ``` cpp
19
  template<class ForwardIterator>
20
  ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last);
 
 
 
 
21
  template<class ForwardIterator, class Compare>
22
  ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last,
23
  Compare comp);
 
 
 
 
24
  ```
25
 
26
- *Returns:* If `distance(first, last) < 2`, returns `last`. Otherwise,
27
- returns the last iterator `i` in \[`first`, `last`\] for which the range
28
  \[`first`, `i`) is sorted.
29
 
30
  *Complexity:* Linear.
31
 
 
5
  bool is_sorted(ForwardIterator first, ForwardIterator last);
6
  ```
7
 
8
  *Returns:* `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
+ *Returns:*
17
+ `is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last) == last`
18
+
19
  ``` cpp
20
  template<class ForwardIterator, class Compare>
21
  bool is_sorted(ForwardIterator first, ForwardIterator last,
22
  Compare comp);
23
  ```
24
 
25
  *Returns:* `is_sorted_until(first, last, comp) == last`
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
+ *Returns:*
35
+
36
+ ``` cpp
37
+ is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last, comp) == last
38
+ ```
39
+
40
  ``` cpp
41
  template<class ForwardIterator>
42
  ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last);
43
+ template<class ExecutionPolicy, class ForwardIterator>
44
+ ForwardIterator is_sorted_until(ExecutionPolicy&& exec,
45
+ ForwardIterator first, ForwardIterator last);
46
+
47
  template<class ForwardIterator, class Compare>
48
  ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last,
49
  Compare comp);
50
+ template<class ExecutionPolicy, class ForwardIterator, class Compare>
51
+ ForwardIterator is_sorted_until(ExecutionPolicy&& exec,
52
+ ForwardIterator first, ForwardIterator last,
53
+ Compare comp);
54
  ```
55
 
56
+ *Returns:* If `(last - first) < 2`, returns `last`. Otherwise, returns
57
+ the last iterator `i` in \[`first`, `last`\] for which the range
58
  \[`first`, `i`) is sorted.
59
 
60
  *Complexity:* Linear.
61