priority_queue::top

value_type& top();
const value_type& top() const;

The member function returns a reference to the first (highest priority) element of the controlled sequence, which must be non-empty.

See the related sample program.