tmp/tmpn6hap5sf/{from.md → to.md}
RENAMED
|
@@ -4,32 +4,48 @@
|
|
| 4 |
template<class InputIterator, class OutputIterator,
|
| 5 |
class UnaryOperation>
|
| 6 |
OutputIterator
|
| 7 |
transform(InputIterator first, InputIterator last,
|
| 8 |
OutputIterator result, UnaryOperation op);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
template<class InputIterator1, class InputIterator2,
|
| 11 |
class OutputIterator, class BinaryOperation>
|
| 12 |
OutputIterator
|
| 13 |
transform(InputIterator1 first1, InputIterator1 last1,
|
| 14 |
InputIterator2 first2, OutputIterator result,
|
| 15 |
BinaryOperation binary_op);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
```
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
*Effects:* Assigns through every iterator `i` in the range \[`result`,
|
| 19 |
`result + (last1 - first1)`) a new corresponding value equal to
|
| 20 |
-
`op(*(first1 + (i - result))` or
|
| 21 |
`binary_op(*(first1 + (i - result)), *(first2 + (i - result)))`.
|
| 22 |
|
| 23 |
-
*Requires:* `op` and `binary_op` shall not invalidate iterators or
|
| 24 |
-
subranges, or modify elements in the ranges \[`first1`, `last1`\],
|
| 25 |
-
\[`first2`, `first2 + (last1 - first1)`\], and \[`result`,
|
| 26 |
-
`result + (last1 - first1)`\].[^4]
|
| 27 |
-
|
| 28 |
*Returns:* `result + (last1 - first1)`.
|
| 29 |
|
| 30 |
*Complexity:* Exactly `last1 - first1` applications of `op` or
|
| 31 |
-
`binary_op`.
|
|
|
|
| 32 |
|
| 33 |
*Remarks:* `result` may be equal to `first` in case of unary transform,
|
| 34 |
or to `first1` or `first2` in case of binary transform.
|
| 35 |
|
|
|
|
| 4 |
template<class InputIterator, class OutputIterator,
|
| 5 |
class UnaryOperation>
|
| 6 |
OutputIterator
|
| 7 |
transform(InputIterator first, InputIterator last,
|
| 8 |
OutputIterator result, UnaryOperation op);
|
| 9 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 10 |
+
class UnaryOperation>
|
| 11 |
+
ForwardIterator2
|
| 12 |
+
transform(ExecutionPolicy&& exec,
|
| 13 |
+
ForwardIterator1 first, ForwardIterator1 last,
|
| 14 |
+
ForwardIterator2 result, UnaryOperation op);
|
| 15 |
|
| 16 |
template<class InputIterator1, class InputIterator2,
|
| 17 |
class OutputIterator, class BinaryOperation>
|
| 18 |
OutputIterator
|
| 19 |
transform(InputIterator1 first1, InputIterator1 last1,
|
| 20 |
InputIterator2 first2, OutputIterator result,
|
| 21 |
BinaryOperation binary_op);
|
| 22 |
+
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
|
| 23 |
+
class ForwardIterator, class BinaryOperation>
|
| 24 |
+
ForwardIterator
|
| 25 |
+
transform(ExecutionPolicy&& exec,
|
| 26 |
+
ForwardIterator1 first1, ForwardIterator1 last1,
|
| 27 |
+
ForwardIterator2 first2, ForwardIterator result,
|
| 28 |
+
BinaryOperation binary_op);
|
| 29 |
```
|
| 30 |
|
| 31 |
+
*Requires:* `op` and `binary_op` shall not invalidate iterators or
|
| 32 |
+
subranges, or modify elements in the ranges
|
| 33 |
+
|
| 34 |
+
- \[`first1`, `last1`\],
|
| 35 |
+
- \[`first2`, `first2 + (last1 - first1)`\], and
|
| 36 |
+
- \[`result`, `result + (last1 - first1)`\].[^4]
|
| 37 |
+
|
| 38 |
*Effects:* Assigns through every iterator `i` in the range \[`result`,
|
| 39 |
`result + (last1 - first1)`) a new corresponding value equal to
|
| 40 |
+
`op(*(first1 + (i - result)))` or
|
| 41 |
`binary_op(*(first1 + (i - result)), *(first2 + (i - result)))`.
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
*Returns:* `result + (last1 - first1)`.
|
| 44 |
|
| 45 |
*Complexity:* Exactly `last1 - first1` applications of `op` or
|
| 46 |
+
`binary_op`. This requirement also applies to the overload with an
|
| 47 |
+
`ExecutionPolicy` .
|
| 48 |
|
| 49 |
*Remarks:* `result` may be equal to `first` in case of unary transform,
|
| 50 |
or to `first1` or `first2` in case of binary transform.
|
| 51 |
|