unchecked_partial_sum
Same as partial_sum, but allows the use of an unchecked iterator as output iterator when _SECURE_SCL=1 is defined. unchecked_partial_sum is defined in the stdext namespace.
备注
This algorithm is a Microsoft extension to the Standard C++ Library. Code implemented using this algorithm will not be portable.
template<class InputIterator, class OutIterator>
OutputIterator unchecked_partial_sum(
InputIterator_First,
InputIterator _Last,
OutputIterator _Result
);
template<class InputIterator, class OutIterator, class BinaryOperation>
OutputIterator unchecked_partial_sum(
InputIterator _First,
InputIterator _Last,
OutputIterator _Result,
BinaryOperation _Binary_op
);
Parameters
_First
An input iterator addressing the first element in the range to be partially summed or combined according to a specified binary operation._Last
An input iterator addressing the last element in the range to be partially summed or combined according to a specified binary operation that is one position beyond the final element actually included in the iterated accumulation._Result
An output iterator addressing the first element a destination range where the series of partial sums or the results of the specified operation is to be stored._Binary_op
The binary operation that is to be applied in the generalized operation replacing the operation of sum in the partial sum procedure.
Return Value
An output iterator addressing the end of the destination range: _Result + (_Last - _First),
Remarks
See partial_sum for a code sample.
For more information on checked iterators, see Checked Iterators.
Requirements
Header: <numeric>
Namespace: stdext