template<class RandomAccessIterator>
void partial_sort(RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last);
template<class ExecutionPolicy, class RandomAccessIterator>
void partial_sort(ExecutionPolicy&& exec,
RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last);
template<class RandomAccessIterator, class Compare>
void partial_sort(RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last,
Compare comp);
template<class ExecutionPolicy, class RandomAccessIterator, class Compare>
void partial_sort(ExecutionPolicy&& exec,
RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last,
Compare comp);
The type
of
*first shall satisfy the requirements of
MoveConstructible (Table
23) and of
MoveAssignable (Table
25)
. Effects:
Places the first
middle - first
sorted elements from the range
[first, last)
into the range
[first, middle). The rest of the elements in the range
[middle, last)
are placed in an unspecified order
. Complexity:
Approximately
(last - first) * log(middle - first)
comparisons
.