According to the cppreference website on priority_queue:
Container - The type of the underlying container to use to store the elements. The container must satisfy the requirements of SequenceContainer, and its iterators must satisfy the requirements of LegacyRandomAccessIterator. Additionally, it must provide the following functions with the usual semantics:
front()
push_back()
pop_back()
The standard containers std::vector and std::deque satisfy these requirements.
and "C++ Primer, 5th Edition" by Stanley Lipmann:
q.back() Only valid for queue
Since cppreference states that priority_queue (container adaptor) requires front(), push_back() and pop_back(), why is q.back() only valid for queue and not for priority_queue? If you look at cppreference for priority_queue, there's no function back() for it.