sort_heap |
Starting with a heap as an input
sequence, produce a sorted collection. The first version uses operator<
to compare elements, whereas the second version uses the binary function compare
. Note that a heap ceases to be a heap when it is sorted.
#include <algorithm>
template< class RandomAccessIterator >
void sort_heap
(
RandomAccessIterator first,
RandomAccessIterator last
);
template< class RandomAccessIterator, class Compare >
void sort_heap
(
RandomAccessIterator first,
RandomAccessIterator last,
Compare compare
);
Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.