[#BloombergLP-bdlcc-Deque-tryPopFront-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Deque.adoc[Deque]::tryPopFront
:relfileprefix: ../../../
:mrdocs:

`tryPopFront` overloads

== Synopses

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

Remove up to the specified `maxNumItems` from the front of this container&period; Optionally specify a `buffer` into which the items removed from the container are appended&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(popFront())` while the const is not empty and `maxNumItems` have not yet been removed&period; Note that `&ast;buffer` is not cleared &hyphen;&hyphen; the popped items are appended after any pre&hyphen;existing contents&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlcc/Deque/tryPopFront-0a.adoc[tryPopFront](xref:BloombergLP/bdlcc/Deque/size_type.adoc[size&lowbar;type] maxNumItems);
----

[.small]#xref:BloombergLP/bdlcc/Deque/tryPopFront-0a.adoc[_» more&period;&period;&period;_]#

If this container is non&hyphen;empty, remove the first item, load that item into the specified `&ast;item`, and return 0 indicating success&period; If this container is empty, return a non&hyphen;zero value with no effect on `&ast;item` or the state of this container&period;


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

[.small]#xref:BloombergLP/bdlcc/Deque/tryPopFront-06.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/Deque/tryPopFront-08.adoc[tryPopFront](
    xref:BloombergLP/bdlcc/Deque/size_type.adoc[size&lowbar;type] maxNumItems,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;TYPE&gt;]* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Deque/tryPopFront-08.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/Deque/tryPopFront-02.adoc[tryPopFront](
    xref:BloombergLP/bdlcc/Deque/size_type.adoc[size&lowbar;type] maxNumItems,
    std::pmr::vector&lt;TYPE&gt;* buffer);
----

[.small]#xref:BloombergLP/bdlcc/Deque/tryPopFront-02.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/Deque/tryPopFront-00.adoc[tryPopFront](
    xref:BloombergLP/bdlcc/Deque/size_type.adoc[size&lowbar;type] maxNumItems,
    std::vector&lt;TYPE&gt;* buffer);
----

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


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