Description

The two versions of make_heap differ in how they define whether one
element is less than another. The first version compares
objects using operator<, and the second compares objects using
a function objectcomp.
In the first version the postcondition is that is_heap(first, last)
is true, and in the second version the
postcondition is that is_heap(first, last, comp) is true.

Definition

Defined in the standard header algorithm, and in the nonstandard
backward-compatibility header algo.h.

Notes

[1]
A heap is a particular way of ordering the elements in a range of
Random Access Iterators[f, l). The reason heaps are useful
(especially for sorting, or as priority queues) is that they satisfy
two important properties. First, *f is the largest element in the
heap. Second, it is possible to add an element to a heap (using
push_heap), or to remove *f, in logarithmic time.
Internally, a heap is simply a tree represented as a sequential range.
The tree is constructed so that that each
node is less than or equal to its parent node.