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

Synopsis

Declared in <absl/algorithm/container.h>

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);

Description

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

Return Value

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

Parameters

Name

Description

input1

The first input container.

input2

The second input container.

output

The destination container receiving the transformed elements.

binary_op

The binary operation applied to element pairs.

Created with MrDocs