[#absl-c_transform-06]
= xref:absl.adoc[absl]::c&lowbar;transform
:relfileprefix: ../
:mrdocs:

`c&lowbar;transform` overloads

== Synopses

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

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;transform()` function to transform a container&apos;s elements using the unary operation, storing the result in an iterator pointing to the last transformed element in the output range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputSequence,
    typename OutputIterator,
    typename UnaryOp&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:absl/c_transform-08.adoc[c&lowbar;transform](
    InputSequence const& input,
    OutputIterator&& output,
    UnaryOp&& unary&lowbar;op);
----

[.small]#xref:absl/c_transform-08.adoc[_» more&period;&period;&period;_]#

Performs a transformation using a unary predicate&period; Stores the result in `output`&period; `absl&colon;&colon;c&lowbar;transform(input, output, unary&lowbar;op)` is equivalent to &grave;std&colon;&colon;transform(std&colon;&colon;begin(input), std&colon;&colon;end(input), std&colon;&colon;begin(output), unary&lowbar;op)&grave;&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputSequence,
    typename OutputRange,
    typename UnaryOp&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:absl/c_transform-0f.adoc[c&lowbar;transform](
    InputSequence const& input,
    OutputRange&& output,
    UnaryOp&& unary&lowbar;op);
----

[.small]#xref:absl/c_transform-0f.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;transform()` for performing a transformation using a binary predicate&period; Applies `binary&lowbar;op` to the first N elements of `c1` and `c2`, where N &equals; min(size(c1), size(c2))&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputSequence1,
    typename InputSequence2,
    typename OutputIterator,
    typename BinaryOp&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:absl/c_transform-07.adoc[c&lowbar;transform](
    InputSequence1 const& input1,
    InputSequence2 const& input2,
    OutputIterator&& output,
    BinaryOp&& binary&lowbar;op);
----

[.small]#xref:absl/c_transform-07.adoc[_» more&period;&period;&period;_]#

Performs a transformation using a binary predicate&period; Stores the result in `output`&period; Applies `binary&lowbar;op` to the first N elements of `input1` and `input2`, where N &equals; min(size(input1), size(input2))&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputSequence1,
    typename InputSequence2,
    typename OutputRange,
    typename BinaryOp&gt;
constexpr
std::common&lowbar;type&lowbar;t&lt;&sol;&ast; implementation-defined &ast;&sol;, &sol;&ast; implementation-defined &ast;&sol;&gt;
xref:absl/c_transform-0a.adoc[c&lowbar;transform](
    InputSequence1 const& input1,
    InputSequence2 const& input2,
    OutputRange&& output,
    BinaryOp&& binary&lowbar;op);
----

[.small]#xref:absl/c_transform-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

* An iterator to the end of the transformed range in the output&period;
* This overload returns no value&semi; the results are written into `output`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *input*
| The container whose elements to transform&period;
| *output*
| The output iterator receiving the transformed elements&period;
| *unary&lowbar;op*
| The unary operation applied to each element&period;
| *input1*
| The first input container&period;
| *input2*
| The second input container&period;
| *binary&lowbar;op*
| The binary operation applied to element pairs&period;
|===


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