cpp/numeric/valarray/shift

Returns a new valarray of the same size with elements whose positions are shifted by elements. The new position of each element is $i−count$ where $i$ is the previous position. The value of shifted in elements is.

Return value
The resulting valarray with shifted elements.