The function stable_sort is used to sort the range but preserves the original order for equal elements.
template<class RandomAccessIterator> void stable_sort (RandomAccessIterator first, RandomAccessIterator last); template<class RandomAccessIterator, class Compare> void stable_sort (RandomAccessIterator first, RandomAccessIterator last,Compare comp);
There is no return value.