Hi everybody,
I need to store my class A objects in some data structure. In addition, i would like them to be automatically sorted according to a key, which is in my case an embedded object of another class B.
Thus I decided to use a STL priority queue.
However it is possible that the 2 or more objects B to have the same key value.
My questions:
Does the STL priority queue allow duplicate keys??
If it does what should I consider and which predicate should I use?
I know I could use a multiset but its Big O notation performance is worse, that why I want to use the priority queue.