|
8807 | 8807 | with the initial value
|
8808 | 8808 | \tcode{init}
|
8809 | 8809 | and then modifies it with
|
8810 |
| -\tcode{acc = acc + *i} |
| 8810 | +\tcode{acc = std::move(acc) + *i} |
8811 | 8811 | or
|
8812 |
| -\tcode{acc = binary_op(acc, *i)} |
| 8812 | +\tcode{acc = binary_op(std::move(acc), *i)} |
8813 | 8813 | for every iterator
|
8814 | 8814 | \tcode{i}
|
8815 | 8815 | in the range \range{first}{last}
|
|
8961 | 8961 | with the initial value
|
8962 | 8962 | \tcode{init}
|
8963 | 8963 | and then modifying it with
|
8964 |
| -\tcode{acc = acc + (*i1) * (*i2)} |
| 8964 | +\tcode{acc = std::move(acc) + (*i1) * (*i2)} |
8965 | 8965 | or
|
8966 |
| -\tcode{acc = binary_op1(acc, binary_op2(*i1, *i2))} |
| 8966 | +\tcode{acc = binary_op1(std::move(acc), binary_op2(*i1, *i2))} |
8967 | 8967 | for every iterator
|
8968 | 8968 | \tcode{i1}
|
8969 | 8969 | in the range \range{first1}{last1}
|
|
9114 | 9114 | \pnum
|
9115 | 9115 | \requires
|
9116 | 9116 | \tcode{InputIterator}'s value type shall be constructible from the type of \tcode{*first}.
|
9117 |
| -The result of the expression \tcode{acc + *i} or \tcode{binary_op(acc, *i)} shall be |
| 9117 | +The result of the expression \tcode{std::move(acc) + *i} or \tcode{binary_op(std::move(acc), *i)} shall be |
9118 | 9118 | implicitly convertible to \tcode{InputIterator}'s value type. \tcode{acc}
|
9119 | 9119 | shall be writable\iref{iterator.requirements.general} to the \tcode{result} output iterator.
|
9120 | 9120 | In the ranges
|
|
9130 | 9130 | the function creates an accumulator \tcode{acc} whose type is \tcode{InputIterator}'s
|
9131 | 9131 | value type, initializes it with \tcode{*first},
|
9132 | 9132 | and assigns the result to \tcode{*result}. For every iterator \tcode{i} in \range{first + 1}{last}
|
9133 |
| -in order, \tcode{acc} is then modified by \tcode{acc = acc + *i} or \tcode{acc = binary_op(acc, *i)} |
| 9133 | +in order, \tcode{acc} is then modified by \tcode{acc = std::move(acc) + *i} or \tcode{acc = binary_op(std::move(acc), *i)} |
9134 | 9134 | and the result is assigned to \tcode{*(result + (i - first))}.
|
9135 | 9135 |
|
9136 | 9136 | \pnum
|
|
9540 | 9540 | type shall be \tcode{MoveAssignable} (Table~\ref{tab:moveassignable}) and shall
|
9541 | 9541 | be constructible from the type of \tcode{*first}. \tcode{acc} (defined below)
|
9542 | 9542 | shall be writable\iref{iterator.requirements.general} to the \tcode{result}
|
9543 |
| -output iterator. The result of the expression \tcode{val - acc} or |
9544 |
| -\tcode{binary_op(val, acc)} shall be writable to the \tcode{result} output iterator. |
| 9543 | +output iterator. The result of the expression \tcode{val - std::move(acc)} or |
| 9544 | +\tcode{binary_op(val, std::move(acc))} shall be writable to the \tcode{result} output iterator. |
9545 | 9545 |
|
9546 | 9546 | \item
|
9547 | 9547 | For the overloads with an \tcode{ExecutionPolicy}, the value type of
|
|
9567 | 9567 | value type, initializes it with \tcode{*first},
|
9568 | 9568 | and assigns the result to \tcode{*result}. For every iterator \tcode{i} in \range{first + 1}{last}
|
9569 | 9569 | in order, creates an object \tcode{val} whose type is \tcode{InputIterator}'s value type, initializes it
|
9570 |
| -with \tcode{*i}, computes \tcode{val - acc} or \tcode{binary_op(val, acc)}, assigns the result |
| 9570 | +with \tcode{*i}, computes \tcode{val - std::move(acc)} or \tcode{binary_op(val, std::move(acc))}, assigns the result |
9571 | 9571 | to \tcode{*(result + (i - first))}, and move assigns from \tcode{val} to \tcode{acc}.
|
9572 | 9572 |
|
9573 | 9573 | \pnum
|
|
0 commit comments