On Wed, 18 Dec 2024, Jonathan Wakely wrote:
> We don't know what state an arbitrary sequence container will be in
> after moving from it, so a moved-from std::priority_queue needs to clear
> the moved-from container to ensure it doesn't contain elements that are
> in an invalid order for the queue
We don't know what state an arbitrary sequence container will be in
after moving from it, so a moved-from std::priority_queue needs to clear
the moved-from container to ensure it doesn't contain elements that are
in an invalid order for the queue. An alternative would be to call
std::make_heap agai