The class/parameter names in the prototype do not match the version in the header file. Some have been modified to improve readability.

A heap is a sequence of elements organized like a binary tree. Each heap element corresponds to a tree node. The first value in the sequence [First..Last) is the root and is ordered by the predicate. For example, if the predicate is greater, every element in the heap satisfies the following statement: Every element is greater than or equal to its parent. The smallest element is stored in the root, and all children hold progressively larger values. The make_heap function converts the range [First..Last) into a heap. The sort_heap function sorts a sequence that was created using the make_heap function. The push_heap function inserts a new value into the heap. The pop_heap function swaps the first and last elements in the heap specified by [First, Last), and then reduces the length of the sequence by one before restoring the heap property. The predicate versions of the heap functions use the compare function for comparisons.