From Jason Turner

[alg.swap]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmph7gh_r9p/{from.md → to.md} +11 -6
tmp/tmph7gh_r9p/{from.md → to.md} RENAMED
@@ -1,30 +1,35 @@
1
- ### swap <a id="alg.swap">[[alg.swap]]</a>
2
 
3
  ``` cpp
4
  template<class ForwardIterator1, class ForwardIterator2>
5
  ForwardIterator2
6
  swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1,
7
  ForwardIterator2 first2);
 
 
 
 
 
8
  ```
9
 
10
- *Effects:* For each non-negative integer `n < (last1 - first1)`
11
- performs: `swap(*(first1 + n), *(first2 + n))`.
12
-
13
  *Requires:* The two ranges \[`first1`, `last1`) and \[`first2`,
14
  `first2 + (last1 - first1)`) shall not overlap. `*(first1 + n)` shall be
15
  swappable with ([[swappable.requirements]]) `*(first2 + n)`.
16
 
 
 
 
17
  *Returns:* `first2 + (last1 - first1)`.
18
 
19
  *Complexity:* Exactly `last1 - first1` swaps.
20
 
21
  ``` cpp
22
  template<class ForwardIterator1, class ForwardIterator2>
23
  void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
24
  ```
25
 
26
- *Effects:* `swap(*a, *b)`.
27
-
28
  *Requires:* `a` and `b` shall be dereferenceable. `*a` shall be
29
  swappable with ([[swappable.requirements]]) `*b`.
30
 
 
 
 
1
+ ### Swap <a id="alg.swap">[[alg.swap]]</a>
2
 
3
  ``` cpp
4
  template<class ForwardIterator1, class ForwardIterator2>
5
  ForwardIterator2
6
  swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1,
7
  ForwardIterator2 first2);
8
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
9
+ ForwardIterator2
10
+ swap_ranges(ExecutionPolicy&& exec,
11
+ ForwardIterator1 first1, ForwardIterator1 last1,
12
+ ForwardIterator2 first2);
13
  ```
14
 
 
 
 
15
  *Requires:* The two ranges \[`first1`, `last1`) and \[`first2`,
16
  `first2 + (last1 - first1)`) shall not overlap. `*(first1 + n)` shall be
17
  swappable with ([[swappable.requirements]]) `*(first2 + n)`.
18
 
19
+ *Effects:* For each non-negative integer `n < (last1 - first1)`
20
+ performs: `swap(*(first1 + n), *(first2 + n))`.
21
+
22
  *Returns:* `first2 + (last1 - first1)`.
23
 
24
  *Complexity:* Exactly `last1 - first1` swaps.
25
 
26
  ``` cpp
27
  template<class ForwardIterator1, class ForwardIterator2>
28
  void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
29
  ```
30
 
 
 
31
  *Requires:* `a` and `b` shall be dereferenceable. `*a` shall be
32
  swappable with ([[swappable.requirements]]) `*b`.
33
 
34
+ *Effects:* As if by `swap(*a, *b)`.
35
+