[#BloombergLP-bdlcc-FixedQueue_PopGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::FixedQueue&lowbar;PopGuard
:relfileprefix: ../../
:mrdocs:

This class provides a guard that, upon its destruction, will remove (pop) the indicated element from the `FixedQueue` object supplied at construction&period; Note that this guard is used to provide exception safety when popping an element from a `FixedQueue` object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class VAL&gt;
class FixedQueue&lowbar;PopGuard;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/FixedQueue_PopGuard/2constructor.adoc[`FixedQueue&lowbar;PopGuard`]         [.small]#[constructor]#
| Create a guard that, upon its destruction, will update the state of the specified `queue` to remove (pop) the element at the specified `index` having the specified `generation`, and destroy that popped object&period; The behavior is undefined unless `index` and `generation` refer to a valid element in `queue` that the current thread has acquired a reservation to pop (using `FixedQueueIndexManager&colon;&colon;reservePopIndex`)&period;
| xref:BloombergLP/bdlcc/FixedQueue_PopGuard/2destructor.adoc[`&#126;FixedQueue&lowbar;PopGuard`] [.small]#[destructor]#
| Update the state of the `FixedQueue` object supplied at construction to remove (pop) the indicated element, and destroy the popped object&period;
|===



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