cpp/algorithm/ranges/rotate

@1@Performs a left rotation on a range of elements. Specifically, swaps the elements in the range  in such a way that the element  becomes the first element of the new range and  becomes the last element.

@@ The behavior is undefined if is not a valid range or  is not in.

@2@ Same as, but uses as the range, as if using  as  and  as.

Return value
, where compares equal to  and designates a new location of the element pointed by.

Complexity
Linear at worst: swaps.

Possible implementation
See also the implementations in libstdc++ and MSVC STL.