25 Algorithms library [algorithms]

25.5 Sorting and related operations [alg.sorting]

25.5.6 Heap operations [alg.heap.operations]

25.5.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);

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

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

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