23 Algorithms library [algorithms]

23.7 Sorting and related operations [alg.sorting]

23.7.1 Sorting [alg.sort]

23.7.1.1 sort [sort]

template<class RandomAccessIterator> constexpr void sort(RandomAccessIterator first, RandomAccessIterator last); template<class ExecutionPolicy, class RandomAccessIterator> void sort(ExecutionPolicy&& exec, RandomAccessIterator first, RandomAccessIterator last); template<class RandomAccessIterator, class Compare> constexpr void sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template<class ExecutionPolicy, class RandomAccessIterator, class Compare> void sort(ExecutionPolicy&& exec, RandomAccessIterator first, RandomAccessIterator last, Compare comp);
Requires: RandomAccessIterator shall satisfy the Cpp17ValueSwappable requirements ([swappable.requirements]).
The type of *first shall satisfy the Cpp17MoveConstructible (Table 25) and Cpp17MoveAssignable (Table 27) requirements.
Effects: Sorts the elements in the range [first, last).
Complexity: comparisons, where .