[#bsl-priority_queue-034-top] = xref:bsl.adoc[bsl]::xref:bsl/priority_queue-034.adoc[priority_queue]::top :relfileprefix: ../../ :mrdocs: Return a reference providing non‐modifiable access to the element having the highest priority in this `priority_queue` object. In effect, performs `return c.front()`. The behavior is undefined if the priority queue is empty. == Synopsis Declared in `<bslstl_priorityqueue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/priority_queue-034/const_reference.adoc[priority_queue<VALUE, CONTAINER, COMPARATOR>::const_reference] top() const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#