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

Create a guard that reverses a move unless `release` is called&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
DequePrimitives&lowbar;DequeMoveGuard(
    xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/Iterator.adoc[Iterator] dest,
    xref:BloombergLP/bslalg/DequePrimitives_DequeMoveGuard/Iterator.adoc[Iterator] src,
    std::size&lowbar;t size,
    bool isFront);
----

== Description

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;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dest*
| destination iterator of the guarded move
| *src*
| source iterator of the guarded move
| *size*
| number of elements in the guarded move
| *isFront*
| `true` to reverse with `moveFront`, else `moveBack`
|===


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