[#BloombergLP-bdlcc-Queue-tryPopBack-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Queue.adoc[Queue]::tryPopBack
:relfileprefix: ../../../
:mrdocs:

Remove up to the specified `maxNumItems` from the back of this queue&period; Optionally specify a `buffer` into which the items removed from the queue are loaded&period; If `buffer` is non&hyphen;null, the removed items are appended to it as if by repeated application of `buffer&hyphen;&gt;push&lowbar;back(popBack())` while the queue is not empty and `maxNumItems` have not yet been removed&period; This method never blocks&period; The behavior is undefined unless `maxNumItems &gt;&equals; 0`&period; Note that the ordering of the items in `&ast;buffer` after the call is the reverse of the ordering they had in the queue&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;queue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
tryPopBack(int maxNumItems);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
