Template Function sgpl::slide_to

Function Documentation

template<typename RandomIt>
RandomIt sgpl::slide_to(const RandomIt first, const RandomIt last, const RandomIt to)

Move the a selected range to a target position.

The front of the selected range is repositioned so as if inserted before the target position. If the target position is within the selected range this will result in a no-op. In the case of an empty selected range, the target position is returned.

Return

iterator at the new position of the front of the selected range

Parameters
  • first: front of selection

  • last: back of selection

  • to: target to slide to

Template Parameters
  • random: access iterator type