tmp/tmpsaoxeo3j/{from.md → to.md}
RENAMED
|
@@ -6,16 +6,16 @@ template <class InputIterator, class T>
|
|
| 6 |
template <class InputIterator, class T, class BinaryOperation>
|
| 7 |
T accumulate(InputIterator first, InputIterator last, T init,
|
| 8 |
BinaryOperation binary_op);
|
| 9 |
```
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
*Effects:* Computes its result by initializing the accumulator `acc`
|
| 12 |
with the initial value `init` and then modifies it with `acc = acc + *i`
|
| 13 |
or `acc = binary_op(acc, *i)` for every iterator `i` in the range
|
| 14 |
-
\[`first`, `last`) in order.[^
|
| 15 |
-
|
| 16 |
-
*Requires:* `T` shall meet the requirements of `CopyConstructible`
|
| 17 |
-
(Table [[copyconstructible]]) and `CopyAssignable`
|
| 18 |
-
(Table [[copyassignable]]) types. In the range \[`first`, `last`\],
|
| 19 |
-
`binary_op` shall neither modify elements nor invalidate iterators or
|
| 20 |
-
subranges.[^16]
|
| 21 |
|
|
|
|
| 6 |
template <class InputIterator, class T, class BinaryOperation>
|
| 7 |
T accumulate(InputIterator first, InputIterator last, T init,
|
| 8 |
BinaryOperation binary_op);
|
| 9 |
```
|
| 10 |
|
| 11 |
+
*Requires:* `T` shall meet the requirements of `CopyConstructible`
|
| 12 |
+
(Table [[tab:copyconstructible]]) and `CopyAssignable`
|
| 13 |
+
(Table [[tab:copyassignable]]) types. In the range \[`first`, `last`\],
|
| 14 |
+
`binary_op` shall neither modify elements nor invalidate iterators or
|
| 15 |
+
subranges.[^13]
|
| 16 |
+
|
| 17 |
*Effects:* Computes its result by initializing the accumulator `acc`
|
| 18 |
with the initial value `init` and then modifies it with `acc = acc + *i`
|
| 19 |
or `acc = binary_op(acc, *i)` for every iterator `i` in the range
|
| 20 |
+
\[`first`, `last`) in order.[^14]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|