BloombergLP::bslalg::DequePrimitives_DequeMoveGuard::DequePrimitives_DequeMoveGuard

Create a guard that reverses a move unless release is called.

Synopsis

Declared in <bslalg_dequeprimitives.h>

DequePrimitives_DequeMoveGuard(
    Iterator dest,
    Iterator src,
    std::size_t size,
    bool isFront);

Description

Create a guard object that will call moveBack or moveFront, depending on the specified isFront, on the specified size elements from src to dest upon destruction unless release has been called.

Parameters

NameDescription
destdestination iterator of the guarded move
srcsource iterator of the guarded move
sizenumber of elements in the guarded move
isFronttrue to reverse with moveFront, else moveBack