Create a guard that pops the indicated element on destruction.

Synopsis

Declared in <bdlcc_fixedqueue.h>

FixedQueue_PopGuard(
    FixedQueue<VALUE>* queue,
    unsigned int generation,
    unsigned int index);

Description

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. 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::reservePopIndex).

Parameters

Name

Description

queue

queue from which to pop

generation

generation count of the cell being popped

index

index of the cell being popped

Created with MrDocs