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

This `class` provides a specialized proctor object that, upon destruction and unless the `release` method has been called, destroys the elements in a segment of a deque of parameterized `VALUE&lowbar;TYPE`&period; The elements destroyed are delimited by the &quot;guarded&quot; range `&lsqb;d&lowbar;begin &period;&period; d&lowbar;end)&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,
    class ALLOCATOR&gt;
class DequePrimitives&lowbar;DequeElementGuard;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/Iterator.adoc[`Iterator`] 
| This `typedef` is an alias for `Iterator`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/2constructor.adoc[`DequePrimitives&lowbar;DequeElementGuard`]         [.small]#[constructor]#
| Create a deque exception guard object for the sequence of elements of the parameterized `VALUE&lowbar;TYPE` delimited by the specified range `&lsqb;begin &period;&period; end)&rsqb;`&period; The behavior is undefined unless `begin &lt;&equals; end` and unless each element in the range `&lsqb;begin &period;&period; end)&rsqb;` has been initialized&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/2destructor.adoc[`&#126;DequePrimitives&lowbar;DequeElementGuard`] [.small]#[destructor]#
| Call the destructor on each of the elements of the parameterized `VALUE&lowbar;TYPE` delimited by the range `&lsqb;begin &period;&period; end)&rsqb;` and destroy this array exception guard&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/moveBegin.adoc[`moveBegin`] 
| Move the begin iterator by the specified `offset`, and return the new begin iterator&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/moveEnd.adoc[`moveEnd`] 
| Move the end pointer by the specified `offset`, and return the new end pointer&period;
| xref:BloombergLP/bslalg/DequePrimitives_DequeElementGuard/release.adoc[`release`] 
| Set the range of elements guarded by this object to be empty&period; Note that `d&lowbar;begin &equals;&equals; d&lowbar;end` following this operation, but the specific value is unspecified&period;
|===



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