[#BloombergLP-bdlcc-Deque-tryPushBack-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/Deque.adoc[Deque]::tryPushBack
:relfileprefix: ../../../
:mrdocs:

`tryPushBack` overloads

== Synopses

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

If the container is not full (see &lcub;`High&hyphen;Water Mark` Feature&rcub;), append the specified move&hyphen;insertable `item` to the back of the container, otherwise leave the container unchanged&period; If the container is modified, `item` is left in a valid but unspecified state, otherwise `item` is unchanged&period; Return 0 if the container was updated and a non&hyphen;zero value otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/Deque/tryPushBack-06.adoc[tryPushBack](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;TYPE&gt;] item);
----

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

If the container is not full (see &lcub;`High&hyphen;Water Mark` Feature&rcub;), append the specified `item` to the back of the container, otherwise leave the container unchanged&period; Return 0 if the container was updated and a non&hyphen;zero value otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/Deque/tryPushBack-02.adoc[tryPushBack](TYPE const& item);
----

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

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 back of the container, stopping if the container high&hyphen;water mark is reached&period; Return the number of items pushed&period; Note that the items in the range are treated as `const` objects, copied without being modified&period;


[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]
xref:BloombergLP/bdlcc/Deque/tryPushBack-0a.adoc[tryPushBack](
    INPUT&lowbar;ITER begin,
    INPUT&lowbar;ITER end);
----

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


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