23 Algorithms library [algorithms]

23.7 Sorting and related operations [alg.sorting]

23.7.7 Heap operations [alg.heap.operations]

23.7.7.1 push_­heap [push.heap]

template<class RandomAccessIterator> constexpr void push_heap(RandomAccessIterator first, RandomAccessIterator last); template<class RandomAccessIterator, class Compare> constexpr void push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);
Requires: The range [first, last - 1) shall be a valid heap.
The type of *first shall satisfy the Cpp17MoveConstructible requirements (Table 25) and the Cpp17MoveAssignable requirements (Table 27).
Effects: Places the value in the location last - 1 into the resulting heap [first, last).
Complexity: At most comparisons.