From Jason Turner

[stable.sort]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpytcupb_7/{from.md → to.md} +13 -6
tmp/tmpytcupb_7/{from.md → to.md} RENAMED
@@ -1,24 +1,31 @@
1
  #### `stable_sort` <a id="stable.sort">[[stable.sort]]</a>
2
 
3
  ``` cpp
4
  template<class RandomAccessIterator>
5
  void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
 
 
 
6
 
7
  template<class RandomAccessIterator, class Compare>
8
  void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
9
  Compare comp);
 
 
 
 
10
  ```
11
 
12
- *Effects:* Sorts the elements in the range \[`first`, `last`).
13
-
14
  *Requires:* `RandomAccessIterator` shall satisfy the requirements of
15
  `ValueSwappable` ([[swappable.requirements]]). The type of `*first`
16
  shall satisfy the requirements of `MoveConstructible`
17
- (Table  [[moveconstructible]]) and of `MoveAssignable`
18
- (Table  [[moveassignable]]).
19
 
20
- *Complexity:* It does at most N log²(N) (where N` == last - first`)
21
- comparisons; if enough extra memory is available, it is N log(N).
 
 
22
 
23
  *Remarks:* Stable ([[algorithm.stable]]).
24
 
 
1
  #### `stable_sort` <a id="stable.sort">[[stable.sort]]</a>
2
 
3
  ``` cpp
4
  template<class RandomAccessIterator>
5
  void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
6
+ template<class ExecutionPolicy, class RandomAccessIterator>
7
+ void stable_sort(ExecutionPolicy&& exec,
8
+ RandomAccessIterator first, RandomAccessIterator last);
9
 
10
  template<class RandomAccessIterator, class Compare>
11
  void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
12
  Compare comp);
13
+ template<class ExecutionPolicy, class RandomAccessIterator, class Compare>
14
+ void stable_sort(ExecutionPolicy&& exec,
15
+ RandomAccessIterator first, RandomAccessIterator last,
16
+ Compare comp);
17
  ```
18
 
 
 
19
  *Requires:* `RandomAccessIterator` shall satisfy the requirements of
20
  `ValueSwappable` ([[swappable.requirements]]). The type of `*first`
21
  shall satisfy the requirements of `MoveConstructible`
22
+ (Table  [[tab:moveconstructible]]) and of `MoveAssignable`
23
+ (Table  [[tab:moveassignable]]).
24
 
25
+ *Effects:* Sorts the elements in the range \[`first`, `last`).
26
+
27
+ *Complexity:* At most N log²(N) comparisons, where N = `last - first`,
28
+ but only N log N comparisons if there is enough extra memory.
29
 
30
  *Remarks:* Stable ([[algorithm.stable]]).
31