[#absl-c_transform-06] = xref:absl.adoc[absl]::c_transform :relfileprefix: ../ :mrdocs: `c_transform` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::transform()` function to transform a container's elements using the unary operation, storing the result in an iterator pointing to the last transformed element in the output range. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputIterator, typename UnaryOp> constexpr /* implementation-defined */ xref:absl/c_transform-08.adoc[c_transform]( InputSequence const& input, OutputIterator&& output, UnaryOp&& unary_op); ---- [.small]#xref:absl/c_transform-08.adoc[_» more..._]# Performs a transformation using a unary predicate. Stores the result in `output`. `absl::c_transform(input, output, unary_op)` is equivalent to `std::transform(std::begin(input), std::end(input), std::begin(output), unary_op)`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputRange, typename UnaryOp> constexpr /* implementation-defined */ xref:absl/c_transform-0f.adoc[c_transform]( InputSequence const& input, OutputRange&& output, UnaryOp&& unary_op); ---- [.small]#xref:absl/c_transform-0f.adoc[_» more..._]# Overload of `c_transform()` for performing a transformation using a binary predicate. Applies `binary_op` to the first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence1, typename InputSequence2, typename OutputIterator, typename BinaryOp> constexpr /* implementation-defined */ xref:absl/c_transform-07.adoc[c_transform]( InputSequence1 const& input1, InputSequence2 const& input2, OutputIterator&& output, BinaryOp&& binary_op); ---- [.small]#xref:absl/c_transform-07.adoc[_» more..._]# Performs a transformation using a binary predicate. Stores the result in `output`. Applies `binary_op` to the first N elements of `input1` and `input2`, where N = min(size(input1), size(input2)). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence1, typename InputSequence2, typename OutputRange, typename BinaryOp> constexpr std::common_type_t</* implementation-defined */, /* implementation-defined */> xref:absl/c_transform-0a.adoc[c_transform]( InputSequence1 const& input1, InputSequence2 const& input2, OutputRange&& output, BinaryOp&& binary_op); ---- [.small]#xref:absl/c_transform-0a.adoc[_» more..._]# == Return Value * An iterator to the end of the transformed range in the output. * This overload returns no value; the results are written into `output`. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The container whose elements to transform. | *output* | The output iterator receiving the transformed elements. | *unary_op* | The unary operation applied to each element. | *input1* | The first input container. | *input2* | The second input container. | *binary_op* | The binary operation applied to element pairs. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#