BloombergLP::bslalg::DequePrimitives

Namespace for primitive algorithms that operate on deques.

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<
    class VALUE_TYPE,
    int BLOCK_LENGTH>
struct DequePrimitives;

Description

This struct provides a namespace for a suite of utility functions that operate on deques parameterized by the VALUE_TYPE and BLOCK_LENGTH. Depending on the traits of VALUE_TYPE, the default and copy constructors, destructor, assignment operators, etcetera may not be invoked, and instead the operation can be optimized using a no-op, bitwise move, or bitwise copy.

Type Aliases

NameDescription
Iterator Iterator type used to traverse elements in a deque.
size_type Unsigned size type used by deque primitive operations.

Static Member Functions

NameDescription
destruct destruct overloads
emplaceAndMoveToBack Emplace a value, shifting existing elements toward the back.
emplaceAndMoveToBackDispatch emplaceAndMoveToBackDispatch overloads
emplaceAndMoveToFront Emplace a value, shifting existing elements toward the front.
emplaceAndMoveToFrontDispatch emplaceAndMoveToFrontDispatch overloads
erase erase overloads
insertAndMoveToBack insertAndMoveToBack overloads
insertAndMoveToFront insertAndMoveToFront overloads
moveBack Move elements backward with std::memmove and update the iterators.
moveFront Move elements forward with std::memmove and update the iterators.
moveInsertAndMoveToBack moveInsertAndMoveToBack overloads
moveInsertAndMoveToFront moveInsertAndMoveToFront overloads
uninitializedFillNBack Append copies of a value to the back of an uninitialized deque range.
uninitializedFillNFront Prepend copies of a value to the front of an uninitialized deque range.
valueInititalizeN Append value-initialized elements to the back of a deque.

Specializations

NameDescription
DequePrimitives<VALUE_TYPE, 1> Partial specialization of DequePrimitives for one element per block.