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
Name |
Description |
sequence |
The container whose elements to rotate. |
middle |
An iterator to the element that becomes the new first element. |
Created with MrDocs