Prototype

Description

Rotate_copy copies elements from the range [first, last) to the
range [result, result + (last - first)) such that *middle is
copied to *result, *(middle + 1) is copied to *(result + 1), and
so on. Formally, for every integer n such that 0 <= n < last -
first, rotate_copy performs the assignment *(result + (n + (last -
middle)) % (last - first)) = *(first + n). Rotate_copy is similar
to copy followed by rotate, but is more efficient. The
return value is result + (last - first).

Definition

Defined in the standard header algorithm, and in the nonstandard
backward-compatibility header algo.h.