Copies elements from input to output. absl::c_copy(input, output) is equivalent to `std::copy(std::begin(input), std::end(input), std::begin(output))`.

Synopsis

Declared in <absl/algorithm/container.h>

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

Description

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

If std::size(input) > std::size(output), behavior is undefined. If std::size(output) > std::size(input), only std::size(input) elements are copied, and output is not truncated.

Return Value

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

Parameters

Name

Description

input

The container whose elements to copy.

output

The destination container receiving the copied elements.

Created with MrDocs