absl::c_reverse_copy

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

NameDescription
sequenceThe container whose elements to reverse.
resultThe output iterator receiving the reversed elements.