When adding an item, it gets added to the next unused vector element. The sorting range end offset gets updated.
Then it sorts (note you would actually need a custom sort since a PriorityQueue is a pair)
std::push_heap( vec.begin() + startOffset, vec.begin() + endOffset ) [1]
endOffset++; vec.insert( vec.begin() + endOffset, $value ); [1]
endOffset++; vec[endOffset] = $value; [1]
startOffset++;
reply