On https://en.cppreference.com/w/cpp/container/priority_queue/emplace, it shows:
Logarithmic number of comparisons plus the complexity of Container::emplace_back.
But from Argument for O(1) average-case complexity of heap insertion, Heap vs Binary Search Tree (BST), and other resources, the average complexity of insertion into a heap is constant, with worst case logarithmic complexity. On cppreference, it typically shows the average case complexity along with the worst case complexity for a given function. In this particular cppreference link, it does not differentiate whether this is average or worst case complexity, but I think it may be referring to the "average" case complexity as generally that is what is presented when people talk about complexity. If that's the case, how is it that the STL implementation of this function is logarithmic on average?