absl::c_transform

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.

Synopsis

Declared in <absl/algorithm/container.h>

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

Return Value

An iterator to the end of the transformed range in the output.

Parameters

NameDescription
inputThe container whose elements to transform.
outputThe output iterator receiving the transformed elements.
unary_opThe unary operation applied to each element.