Container-based version of the <numeric> std::partial_sum() function to compute the partial sum of the elements in a sequence and write them to an iterator. The partial sum is the sum of all element values so far in the sequence.
Declared in <absl/algorithm/container.h>
template<
typename InputSequence,
typename OutputIt>
constexpr
OutputIt
c_partial_sum(
InputSequence const& input,
OutputIt output_first);
An iterator to the end of the written range in the output.
| Name | Description |
|---|---|
| input | The container whose elements to sum. |
| output_first | The output iterator receiving the partial sums. |