I do not think there is such a guarantee. According to sgi docs , it depends on the underlying data structure.
I think most common implementations use a bunch. Clicking and popping up any item on the heap simply updates the items in it so that there is no node where its children are larger than the parent (for maximum heap). In the case when both children have the same priority, and one of them should take the place of the parent, there is no difference in choosing which node should promote. Thus, for the implementation you need to select the left or right node.
If you really need to have nodes in FIFO order, if all priorities are equal, pass a comparison function that first orders by priority and disconnects using the value stored in the object that contains the number of objects inserted into priority_queue before that.
int cmp(my_object a, my_object b){ if (a.priority!=b.priority) return a.priority<b.priority; else return a.index<b.index; }
source share