Template:cpp/container/sort

Sorts the elements in ascending order. The order of equal elements is preserved. The first version uses to compare the elements, the second version uses the given comparison function.

If an exception is thrown, the order of elements in is unspecified.

Return value
(none)

Complexity
Approximately comparisons, where N is the number of elements in the list.