[#absl-c_accumulate-00]
= xref:absl.adoc[absl]::c&lowbar;accumulate
:relfileprefix: ../
:mrdocs:

Overload of `c&lowbar;accumulate()` for using a binary operations other than addition for computing the accumulation&period;

== Synopsis

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence,
    typename T,
    typename BinaryOp&gt;
constexpr
std::decay&lowbar;t&lt;T&gt;
c&lowbar;accumulate(
    Sequence const& sequence,
    T&& init,
    BinaryOp&& binary&lowbar;op);
----

== Return Value

The accumulated result&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sequence*
| The container whose elements to accumulate&period;
| *init*
| The initial value of the accumulation&period;
| *binary&lowbar;op*
| The binary operation used to combine values&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
