Priority queue top and pop

I have a question about the pop() function for priority queues. If I have multiple items on the same priority, will using pop() delete all of them or the oldest one?

For example, if I had the numbers;

1 2 2 3 3 4 5 5 5 5

in a priority queue.

top() would identify the highest priority which is 5. pop() would delete the highest priority. Would using pop() delete all 5's or just the first 5? I'm working on an program, and I'm not sure if the issue I have is this.
Not to offend anybody, but if you are already working on a program with one in it, couldn't you have just tried it and found out?
pop() should remove only the topmost element, regardless if there are matching elements.
Topic archived. No new replies allowed.