[#bsl-stack-05-top-034] = xref:bsl.adoc[bsl]::xref:bsl/stack-05.adoc[stack]::top :relfileprefix: ../../ :mrdocs: Return a reference to the element at the top of this stack. The behavior is undefined if this stack is empty. == Synopsis Declared in `<bslstl_stack.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- CONTAINER::reference top(); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#