c_transform overloads
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.
template<
typename InputSequence,
typename OutputIterator,
typename UnaryOp>
constexpr
/* implementation-defined */
c_transform(
InputSequence const& input,
OutputIterator&& output,
UnaryOp&& unary_op);
» 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)`.
template<
typename InputSequence,
typename OutputRange,
typename UnaryOp>
constexpr
/* implementation-defined */
c_transform(
InputSequence const& input,
OutputRange&& output,
UnaryOp&& unary_op);
» 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)).
template<
typename InputSequence1,
typename InputSequence2,
typename OutputIterator,
typename BinaryOp>
constexpr
/* implementation-defined */
c_transform(
InputSequence1 const& input1,
InputSequence2 const& input2,
OutputIterator&& output,
BinaryOp&& binary_op);
» 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)).
template<
typename InputSequence1,
typename InputSequence2,
typename OutputRange,
typename BinaryOp>
constexpr
std::common_type_t</* implementation-defined */, /* implementation-defined */>
c_transform(
InputSequence1 const& input1,
InputSequence2 const& input2,
OutputRange&& output,
BinaryOp&& binary_op);
» more...
output.| 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. |