absl::rotate

Rotates the elements in a range so that n_first becomes the new first.

Synopsis

Declared in <absl/algorithm/algorithm.h>

template<class ForwardIt>
[[deprecated]]
constexpr
ForwardIt
rotate(
    ForwardIt first,
    ForwardIt n_first,
    ForwardIt last);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Description

Performs a left rotation on the range [first, last)] such that the element pointed to by n_first becomes the first element of the range.

Return Value

An iterator to the new location of the element previously at first.

Parameters

NameDescription
firstIterator to the first element of the range.
n_firstIterator to the element that should become the new first.
lastIterator one past the last element of the range.