Erase a range of elements from a deque (nil traits).

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<class ALLOCATOR>
static
DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::Iterator
erase(
    Iterator* toBegin,
    Iterator* toEnd,
    Iterator fromBegin,
    Iterator first,
    Iterator last,
    Iterator fromEnd,
    ALLOCATOR allocator,
    bsl::integral_constant<int, BSLALG_DEQUEPRIMITIVES_NIL_TRAITS> traits);

Description

Call the destructor on each of the elements of a deque of parameterized VALUE_TYPE in the specified range [first .. last)]. Shift the elements from the smaller of the specified range [fromBegin .. first)] and [last .. fromEnd)] to fill up the empty spaces after the erasure. Load in the specified toBegin and toEnd the new boundaries of the deque after erasure and return an iterator pointing to the element immediately following the removed elements. The behavior is undefined unless fromBegin <= first <= last <= fromEnd. Note that the last argument is for removing overload ambiguities and is not used.

Return Value

iterator to the element immediately following the removed elements

Parameters

Name

Description

toBegin

loads the new beginning iterator of the deque

toEnd

loads the new end iterator of the deque

fromBegin

current beginning of the deque

first

beginning of the range to erase

last

end of the range to erase (one past the last)

fromEnd

current end of the deque

allocator

allocator used to destroy elements

traits

unused trait tag for overload resolution

Created with MrDocs