[#BloombergLP-bdlcc-Deque-tryPushFront-0a2]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Deque.adoc[Deque]::tryPushFront
:relfileprefix: ../../../
:mrdocs:

Push items from the specified range to the front while space remains&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
xref:BloombergLP/bdlcc/Deque/size_type.adoc[Deque&lt;TYPE&gt;::size&lowbar;type]
tryPushFront(
    INPUT&lowbar;ITER begin,
    INPUT&lowbar;ITER end);
----

== Description

Push as many of the items in the specified range `&lsqb;begin &period;&period; end)&rsqb;` as there is space available for (see &lcub;`High&hyphen;Water Mark` Feature&rcub;) to the front of the container, stopping if the container high&hyphen;water mark is reached&period; Return the number of items pushed&period; Note that the pushed items will be in the container in the reverse of the order in which they occur in the range&period; Also note that the items in the range are treated as `const` objects, copied without being modified&period;

== Return Value

the number of items pushed

== Parameters

[cols="1,4"]
|===
| Name| Description
| *begin*
| start of the input range
| *end*
| end of the input range
|===


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