absl::c_rotate

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

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename Iterator = /* implementation-defined */>
constexpr
Iterator
c_rotate(
    C& sequence,
    Iterator middle);

Return Value

An iterator to the new location of the original first element.

Parameters

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