[#BloombergLP-bslalg-DequePrimitives_DequeMoveGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::DequePrimitives&lowbar;DequeMoveGuard
:relfileprefix: ../../
:mrdocs:

This `class` provides a guard object that, upon destruction and unless the `release` method has been called, uses `moveBack` or `moveFront` to move the &quot;guarded&quot; range `&lsqb;d&lowbar;source&lowbar;p &period;&period; d&lowbar;source&lowbar;p &plus; d&lowbar;size &hyphen; 1&rsqb;` back to `&lsqb;d&lowbar;destination&lowbar;p &period;&period; d&lowbar;destination&lowbar;p &plus; d&lowbar;size &hyphen;1&rsqb;`&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;dequeprimitives&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE&lowbar;TYPE,
    int BLOCK&lowbar;LENGTH&gt;
class DequePrimitives&lowbar;DequeMoveGuard;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/DequePrimitives.adoc[`DequePrimitives`] 
| This `typedef` is an alias for `DequePrimitives`&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/Iterator.adoc[`Iterator`] 
| This `typedef` is an alias to `DequeIterator&lt;VALUE&lowbar;TYPE, BLOCK&lowbar;LENGTH&gt;`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/2constructor.adoc[`DequePrimitives&lowbar;DequeMoveGuard`]         [.small]#[constructor]#
| Create a guard object that will call `moveBack` or `moveFront`, depending on the specified `isFront`, on the specified `size` elements from `src` to `dest` upon destruction unless `release` has been called&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/2destructor.adoc[`&#126;DequePrimitives&lowbar;DequeMoveGuard`] [.small]#[destructor]#
| Call either `moveBack` or `moveFront` depending on `d&lowbar;front` upon destruction unless `release` has been called before this&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/release.adoc[`release`] 
| Set the size of the range guarded by this object to be zero&period;
|===



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