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.
Declared in <absl/algorithm/container.h>
template<
typename C,
typename Iterator = /* implementation-defined */>
constexpr
Iterator
c_rotate(
C& sequence,
Iterator middle);
An iterator to the new location of the original first element.
| Name | Description |
|---|---|
| sequence | The container whose elements to rotate. |
| middle | An iterator to the element that becomes the new first element. |