rotate function template — Rotates elements in a range
template<typename FwdIter>
void rotate(FwdIter first, FwdIter middle, FwdIter last);
The rotate
function
template rotates elements in the range [first
, last
) to the left so that the items in the
range [middle
, last
) are moved to the start of the new
sequence. Elements in the range [first
, middle
) are rotated to the end. See Figure 13-16 for an
example.