Container‐based version of the <algorithm> std::reverse() function to reverse a container's elements and write them to an iterator range.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename OutputIterator>
constexpr
OutputIterator
c_reverse_copy(
    C const& sequence,
    OutputIterator result);

Return Value

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

Parameters

Name

Description

sequence

The container whose elements to reverse.

result

The output iterator receiving the reversed elements.

Created with MrDocs