When using a queue, we want do push an item into it and do assume it will be at the end. And therefore the FIFO equilibrium applies.
Once priority comes into the equation the assumption would be not FIFO, but higher priority items get serverd before lower priority ones.
But what happens with items of same priority.
In short: Does. Not. Care.
If 10 items with different get pushed into the queue, the queue is sorted and pop'ing them will result in the expected order of items.
However if these 10 items have the same priority, the implementation does not keep up to FIFO. And the last added item could be served first, second, last or whatever. There is also no option to enforce this.
You can run the std_reference.cpp implementation for example Link
I provided an implementation PQueue.cpp Link which is somewhat efficent in terms of general approach, but you have to alter the code to represent you data you want to put into the queue.