template<class RandomAccessIterator>
void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
template<class RandomAccessIterator, class Compare>
void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
Compare comp);
Requires: The range
[first, last) shall be a valid heap
. The type
of
*first shall satisfy the requirements of
MoveConstructible (Table
23) and of
MoveAssignable (Table
25)
.Effects:
Sorts elements in the heap
[first, last). Complexity:
At most
comparisons, where
.