template<class RandomAccessIterator>
void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
template<class RandomAccessIterator, class Compare>
void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
Compare comp);
Effects: Sorts the elements in the range [first,last).
Requires: RandomAccessIterator shall satisfy the requirements of ValueSwappable ([swappable.requirements]). The type of *first shall satisfy the requirements of MoveConstructible (Table [moveconstructible]) and of MoveAssignable (Table [moveassignable]).
Complexity: It does at most N log2(N) (where N == last - first) comparisons; if enough extra memory is available, it is N log(N).
Remarks: Stable ([algorithm.stable]).