Date: Wed, 21 Jan 2026 17:42:09 +0100
On 1/21/26 16:59, Arthur O'Dwyer via Std-Proposals wrote:
> This morning it occurs to me that `std::remove_heap` is a decent name
> for the void-returning version (i.e. the version which I called
> `std::foobar_trashing_pop_heap` yesterday). std::list<T> has `remove`
> and `remove_if` with vaguely similar semantics (no value returned), and
> the `std::remove` algorithm works almost exactly this way: it shifts
> items down leaving the tail of the range in a "moved-from" state. So,
> yeah, I'm talking myself into supporting `std::remove_heap` for the
> void-returning version.
I would expect a function called remove_heap to remove an arbitrary
element, not some variation of a pop_heap.
> This morning it occurs to me that `std::remove_heap` is a decent name
> for the void-returning version (i.e. the version which I called
> `std::foobar_trashing_pop_heap` yesterday). std::list<T> has `remove`
> and `remove_if` with vaguely similar semantics (no value returned), and
> the `std::remove` algorithm works almost exactly this way: it shifts
> items down leaving the tail of the range in a "moved-from" state. So,
> yeah, I'm talking myself into supporting `std::remove_heap` for the
> void-returning version.
I would expect a function called remove_heap to remove an arbitrary
element, not some variation of a pop_heap.
Received on 2026-01-21 16:42:13
