C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [Proposal Draft PDF] Add an ability to move the top element from std::priority_queue

From: Alexey Sidorin <alexey.v.sidorin_at_[hidden]>
Date: Sun, 8 Mar 2026 23:26:17 +0200
Hello again.
Sorry for a long delay, but it took me some time to update the document
and the reference implementation. But finally, there is an update.
1. extract_heap_top() renamed to displace_top()
2. Added remove_heap function
3. Changed pop_heap wording (remove_heap() + pop_back())
4. Added benchmark results for `pop_heap() + pop_back()` against
`remove_heap() + pop_back()`. I wished to recheck my claim about
potential performance improvements.
5. Added motivation for adding freestanding functions
6. Different minor improvements.

Thank you in advance.

---
Best regards,
Aleksei Sidorin.

Received on 2026-03-08 21:26:28