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)`.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename InputSequence,
    typename OutputRange,
    typename UnaryOp>
constexpr
/* implementation-defined */
c_transform(
    InputSequence const& input,
    OutputRange&& output,
    UnaryOp&& unary_op);

Description

The output container must be large enough to hold all elements of input; this function does not resize output.

Return Value

This overload returns no value; the results are written into output.

Parameters

Name

Description

input

The container whose elements to transform.

output

The destination container receiving the transformed elements.

unary_op

The unary operation applied to each element.

Created with MrDocs