make_heap function template — Reorders a range to convert it into a heap
template<typename RandIter> void make_heap(RandIter first, RandIter last); template<typename RandIter, typename Compare> void make_heap(RandIter first, RandIter last, Compare comp);
The make_heap
function
template reorders the elements in the range [first
, last
) to form a heap in place.
The first form compares values using the <
operator. The second form calls
comp(*iter
, value)
.