23 Algorithms library [algorithms]

23.7 Sorting and related operations [alg.sorting]

23.7.7 Heap operations [alg.heap.operations]

23.7.7.3 make_­heap [make.heap]

template<class RandomAccessIterator> constexpr void make_heap(RandomAccessIterator first, RandomAccessIterator last); template<class RandomAccessIterator, class Compare> constexpr void make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);
Requires: The type of *first shall satisfy the Cpp17MoveConstructible requirements (Table 25) and the Cpp17MoveAssignable requirements (Table 27).
Effects: Constructs a heap out of the range [first, last).
Complexity: At most comparisons.