Defined in header
[first, last)in ascending order. The order of equal elements is not guaranteed to be preserved. Elements are compared using
compafter applying the projection
r, as if by return ranges::sort(ranges::begin(r), ranges::end(r), comp, proj);
Notwithstanding the declarations depicted above, the actual number and order of template parameters for algorithm declarations is unspecified. Thus, if explicit template arguments are used when calling an algorithm, the program is probably non-portable.
|first, last||-||the range of elements to sort|
|r||-||the range of elements to sort|
|comp||-||the comparator to use|
|proj||-||the projection to apply to elements in the range|
An iterator pointing past the end of the range (i.e., it compares equal to
last for overload (1), and
ranges::end(r) for overload (2)).
O(N·log(N)) comparisons, where N is equal to the number of elements in the range.
|This section is incomplete|
Reason: no example
| sorts a range into ascending order |