I've got a priority queue of items who, from time to time, returns a different comparison result.
Any way to re-sort a priority queue who is storing them?
Ignoring that horrifying comparison operator, I think it's better to use a container that doesn't care about the order of its elements unless you manually sort it. Otherwise you're violating the container's requirements, which I think might be undefined behavior (I'm not sure though).
It was purely as an example.
I'm going to give a try using a std::vector and std::make_heap/... as, from what I understood, that's what the priority_queue is using.
Thanks @ Duoas for the edit (The edit was more useful than the post itself :> )
@LB: I don't think std::list has any kind of big downsides in my situation, besides for the amount of new calls.
Does std::list store the end pointer? Or does it travel all the way through every time?