[#absl-c_adjacent_difference-0b] = xref:absl.adoc[absl]::c_adjacent_difference :relfileprefix: ../ :mrdocs: `c_adjacent_difference` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <numeric> `std::adjacent_difference()` function to compute the difference between each element and the one preceding it and write it to an iterator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputIt> constexpr OutputIt xref:absl/c_adjacent_difference-08.adoc[c_adjacent_difference]( InputSequence const& input, OutputIt output_first); ---- [.small]#xref:absl/c_adjacent_difference-08.adoc[_» more..._]# Overload of `c_adjacent_difference()` for using a binary operation other than subtraction to compute the adjacent difference. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputIt, typename BinaryOp> constexpr OutputIt xref:absl/c_adjacent_difference-03.adoc[c_adjacent_difference]( InputSequence const& input, OutputIt output_first, BinaryOp&& op); ---- [.small]#xref:absl/c_adjacent_difference-03.adoc[_» more..._]# == Return Value An iterator to the end of the written range in the output. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The container whose elements to process. | *output_first* | The output iterator receiving the differences. | *op* | The binary operation used to compute each difference. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#