[#bsl-Deque_ClearGuard]
= xref:bsl.adoc[bsl]::Deque&lowbar;ClearGuard
:relfileprefix: ../
:mrdocs:

This class provides a proctor which, at destruction, calls `clear` on the deque supplied at construction, unless the guard has been released prior&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE&lowbar;TYPE,
    class ALLOCATOR&gt;
class Deque&lowbar;ClearGuard;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/Deque_ClearGuard/2constructor.adoc[`Deque&lowbar;ClearGuard`]         [.small]#[constructor]#
| Create a clear guard that will call `clear` on `deque` unless released&period;
| xref:bsl/Deque_ClearGuard/2destructor.adoc[`&#126;Deque&lowbar;ClearGuard`] [.small]#[destructor]#
| Destroy this guard, and call `clear` on the deque supplied at construction, unless `release` has been called on this object&period;
| xref:bsl/Deque_ClearGuard/release.adoc[`release`] 
| Release from management the deque proctored by this object&period;
|===



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