From Jason Turner

[partial.sort]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp3h9efcz8/{from.md → to.md} +19 -8
tmp/tmp3h9efcz8/{from.md → to.md} RENAMED
@@ -3,27 +3,38 @@
3
  ``` cpp
4
  template<class RandomAccessIterator>
5
  void partial_sort(RandomAccessIterator first,
6
  RandomAccessIterator middle,
7
  RandomAccessIterator last);
 
 
 
 
 
8
 
9
  template<class RandomAccessIterator, class Compare>
10
  void partial_sort(RandomAccessIterator first,
11
  RandomAccessIterator middle,
12
  RandomAccessIterator last,
13
  Compare comp);
 
 
 
 
 
 
14
  ```
15
 
 
 
 
 
 
 
16
  *Effects:* Places the first `middle - first` sorted elements from the
17
  range \[`first`, `last`) into the range \[`first`, `middle`). The rest
18
  of the elements in the range \[`middle`, `last`) are placed in an
19
  unspecified order.
20
 
21
- *Requires:* `RandomAccessIterator` shall satisfy the requirements of
22
- `ValueSwappable` ([[swappable.requirements]]). The type of `*first`
23
- shall satisfy the requirements of `MoveConstructible`
24
- (Table  [[moveconstructible]]) and of `MoveAssignable`
25
- (Table  [[moveassignable]]).
26
-
27
- *Complexity:* It takes approximately
28
- `(last - first) * log(middle - first)` comparisons.
29
 
 
3
  ``` cpp
4
  template<class RandomAccessIterator>
5
  void partial_sort(RandomAccessIterator first,
6
  RandomAccessIterator middle,
7
  RandomAccessIterator last);
8
+ template<class ExecutionPolicy, class RandomAccessIterator>
9
+ void partial_sort(ExecutionPolicy&& exec,
10
+ RandomAccessIterator first,
11
+ RandomAccessIterator middle,
12
+ RandomAccessIterator last);
13
 
14
  template<class RandomAccessIterator, class Compare>
15
  void partial_sort(RandomAccessIterator first,
16
  RandomAccessIterator middle,
17
  RandomAccessIterator last,
18
  Compare comp);
19
+ template<class ExecutionPolicy, class RandomAccessIterator, class Compare>
20
+ void partial_sort(ExecutionPolicy&& exec,
21
+ RandomAccessIterator first,
22
+ RandomAccessIterator middle,
23
+ RandomAccessIterator last,
24
+ Compare comp);
25
  ```
26
 
27
+ *Requires:* `RandomAccessIterator` shall satisfy the requirements of
28
+ `ValueSwappable` ([[swappable.requirements]]). The type of `*first`
29
+ shall satisfy the requirements of `MoveConstructible`
30
+ (Table  [[tab:moveconstructible]]) and of `MoveAssignable`
31
+ (Table  [[tab:moveassignable]]).
32
+
33
  *Effects:* Places the first `middle - first` sorted elements from the
34
  range \[`first`, `last`) into the range \[`first`, `middle`). The rest
35
  of the elements in the range \[`middle`, `last`) are placed in an
36
  unspecified order.
37
 
38
+ *Complexity:* Approximately `(last - first) * log(middle - first)`
39
+ comparisons.
 
 
 
 
 
 
40