absl::c_rotate_copy

Container-based version of the <algorithm> std::rotate_copy() function to shift a container's elements leftward such that the middle element becomes the first element in a new iterator range.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename OutputIterator>
constexpr
OutputIterator
c_rotate_copy(
    C const& sequence,
    /* implementation-defined */ middle,
    OutputIterator result);

Return Value

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

Parameters

NameDescription
sequenceThe container whose elements to rotate.
middleAn iterator to the element that becomes the new first element.
resultThe output iterator receiving the rotated elements.