25 Algorithms library [algorithms]

25.4 Sorting and related operations [alg.sorting]

25.4.6 Heap operations [alg.heap.operations]

25.4.6.3 make_heap [make.heap]

template<class RandomAccessIterator> void make_heap(RandomAccessIterator first, RandomAccessIterator last); template<class RandomAccessIterator, class Compare> void make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

Effects: Constructs a heap out of the range [first,last).

Requires: The type of *first shall satisfy the MoveConstructible requirements (Table [moveconstructible]) and the MoveAssignable requirements (Table [moveassignable]).

Complexity: At most 3 * (last - first) comparisons.