Template Function sgpl::slide_n¶
Defined in File slide_n.hpp
Function Documentation¶
-
template<typename
RandomIt>
RandomItsgpl::slide_n(RandomIt first, RandomIt last, const int amount)¶ Slide a selected window over n positions.
Empty space is filled by shifting existing elements outside the window, like dragging and dropping a contiguous selection up or down a list.
- Return
new position of selection window front
- Parameters
first: front of sliding windowlast: back of sliding windowamount: how far to slide, left if negative and right if positive
- Template Parameters
RandomIt: random access iterator