BloombergLP::bslalg::DequePrimitives_DequeElementGuard

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_TYPE. The elements destroyed are delimited by the "guarded" range [d_begin .. d_end)].

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<
    class VALUE_TYPE,
    int BLOCK_LENGTH,
    class ALLOCATOR>
class DequePrimitives_DequeElementGuard;

Type Aliases

NameDescription
Iterator This typedef is an alias for Iterator.

Member Functions

NameDescription
DequePrimitives_DequeElementGuard [constructor]Create a deque exception guard object for the sequence of elements of the parameterized VALUE_TYPE delimited by the specified range [begin .. end)]. The behavior is undefined unless begin <= end and unless each element in the range [begin .. end)] has been initialized.
~DequePrimitives_DequeElementGuard [destructor]Call the destructor on each of the elements of the parameterized VALUE_TYPE delimited by the range [begin .. end)] and destroy this array exception guard.
moveBegin Move the begin iterator by the specified offset, and return the new begin iterator.
moveEnd Move the end pointer by the specified offset, and return the new end pointer.
release Set the range of elements guarded by this object to be empty. Note that d_begin == d_end following this operation, but the specific value is unspecified.