[#BloombergLP-bdlcc-Queue-tryPopFront-039]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Queue.adoc[Queue]::tryPopFront
:relfileprefix: ../../../
:mrdocs:

`tryPopFront` overloads

== Synopses

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

Remove up to `maxNumItems` from the front of this queue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlcc/Queue/tryPopFront-05.adoc[tryPopFront](int maxNumItems);
----

[.small]#xref:BloombergLP/bdlcc/Queue/tryPopFront-05.adoc[_» more&period;&period;&period;_]#

Try to remove the first item into `buffer` without blocking&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/Queue/tryPopFront-09.adoc[tryPopFront](TYPE* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Queue/tryPopFront-09.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, appending removed items to `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlcc/Queue/tryPopFront-01.adoc[tryPopFront](
    int maxNumItems,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;TYPE&gt;]* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Queue/tryPopFront-01.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, appending removed items to `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlcc/Queue/tryPopFront-031.adoc[tryPopFront](
    int maxNumItems,
    std::pmr::vector&lt;TYPE&gt;* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Queue/tryPopFront-031.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, appending removed items to `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlcc/Queue/tryPopFront-04.adoc[tryPopFront](
    int maxNumItems,
    std::vector&lt;TYPE&gt;* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Queue/tryPopFront-04.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, and a non&hyphen;zero value if the queue is empty

== Parameters

[cols="1,4"]
|===
| Name| Description
| *maxNumItems*
| maximum number of items to remove
| *buffer*
| receives the removed item on success
|===


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