tmp/tmpz86b79rq/{from.md → to.md}
RENAMED
|
@@ -1,39 +1,57 @@
|
|
| 1 |
### Move <a id="alg.move">[[alg.move]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class InputIterator, class OutputIterator>
|
| 5 |
-
OutputIterator move(InputIterator first, InputIterator last,
|
| 6 |
-
OutputIterator result);
|
| 7 |
```
|
| 8 |
|
|
|
|
|
|
|
| 9 |
*Effects:* Moves elements in the range \[`first`, `last`) into the range
|
| 10 |
\[`result`, `result + (last - first)`) starting from first and
|
| 11 |
proceeding to last. For each non-negative integer `n < (last-first)`,
|
| 12 |
performs `*(result + n)` `= std::move(*(first + n))`.
|
| 13 |
|
| 14 |
*Returns:* `result + (last - first)`.
|
| 15 |
|
| 16 |
-
*Requires:* `result` shall not be in the range \[`first`, `last`).
|
| 17 |
-
|
| 18 |
*Complexity:* Exactly `last - first` move assignments.
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
``` cpp
|
| 21 |
template<class BidirectionalIterator1, class BidirectionalIterator2>
|
| 22 |
BidirectionalIterator2
|
| 23 |
move_backward(BidirectionalIterator1 first,
|
| 24 |
BidirectionalIterator1 last,
|
| 25 |
BidirectionalIterator2 result);
|
| 26 |
```
|
| 27 |
|
|
|
|
|
|
|
| 28 |
*Effects:* Moves elements in the range \[`first`, `last`) into the range
|
| 29 |
\[`result - (last-first)`, `result`) starting from `last - 1` and
|
| 30 |
proceeding to first.[^3] For each positive integer
|
| 31 |
`n <= (last - first)`, performs
|
| 32 |
`*(result - n) = std::move(*(last - n))`.
|
| 33 |
|
| 34 |
-
*Requires:* `result` shall not be in the range (`first`, `last`).
|
| 35 |
-
|
| 36 |
*Returns:* `result - (last - first)`.
|
| 37 |
|
| 38 |
*Complexity:* Exactly `last - first` assignments.
|
| 39 |
|
|
|
|
| 1 |
### Move <a id="alg.move">[[alg.move]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class InputIterator, class OutputIterator>
|
| 5 |
+
OutputIterator move(InputIterator first, InputIterator last, OutputIterator result);
|
|
|
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Requires:* `result` shall not be in the range \[`first`, `last`).
|
| 9 |
+
|
| 10 |
*Effects:* Moves elements in the range \[`first`, `last`) into the range
|
| 11 |
\[`result`, `result + (last - first)`) starting from first and
|
| 12 |
proceeding to last. For each non-negative integer `n < (last-first)`,
|
| 13 |
performs `*(result + n)` `= std::move(*(first + n))`.
|
| 14 |
|
| 15 |
*Returns:* `result + (last - first)`.
|
| 16 |
|
|
|
|
|
|
|
| 17 |
*Complexity:* Exactly `last - first` move assignments.
|
| 18 |
|
| 19 |
+
``` cpp
|
| 20 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
|
| 21 |
+
ForwardIterator2 move(ExecutionPolicy&& policy,
|
| 22 |
+
ForwardIterator1 first, ForwardIterator1 last,
|
| 23 |
+
ForwardIterator2 result);
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
*Requires:* The ranges \[`first`, `last`) and \[`result`,
|
| 27 |
+
`result + (last - first)`) shall not overlap.
|
| 28 |
+
|
| 29 |
+
*Effects:* Moves elements in the range \[`first`, `last`) into the range
|
| 30 |
+
\[`result`, `result + (last - first)`). For each non-negative integer
|
| 31 |
+
`n < (last - first)`, performs
|
| 32 |
+
`*(result + n) = std::move(*(first + n))`.
|
| 33 |
+
|
| 34 |
+
*Returns:* `result + (last - first)`.
|
| 35 |
+
|
| 36 |
+
*Complexity:* Exactly `last - first` assignments.
|
| 37 |
+
|
| 38 |
``` cpp
|
| 39 |
template<class BidirectionalIterator1, class BidirectionalIterator2>
|
| 40 |
BidirectionalIterator2
|
| 41 |
move_backward(BidirectionalIterator1 first,
|
| 42 |
BidirectionalIterator1 last,
|
| 43 |
BidirectionalIterator2 result);
|
| 44 |
```
|
| 45 |
|
| 46 |
+
*Requires:* `result` shall not be in the range (`first`, `last`).
|
| 47 |
+
|
| 48 |
*Effects:* Moves elements in the range \[`first`, `last`) into the range
|
| 49 |
\[`result - (last-first)`, `result`) starting from `last - 1` and
|
| 50 |
proceeding to first.[^3] For each positive integer
|
| 51 |
`n <= (last - first)`, performs
|
| 52 |
`*(result - n) = std::move(*(last - n))`.
|
| 53 |
|
|
|
|
|
|
|
| 54 |
*Returns:* `result - (last - first)`.
|
| 55 |
|
| 56 |
*Complexity:* Exactly `last - first` assignments.
|
| 57 |
|