BloombergLP::bslalg::ArrayPrimitives::erase

Erase a range of elements and close the gap by moving.

Synopses

Declared in <bslalg_arrayprimitives.h>

Erase a range of elements and close the gap by moving.

template<class ALLOCATOR>
static
void
erase(
    bsl::allocator_traits<ALLOCATOR>::pointer first,
    bsl::allocator_traits<ALLOCATOR>::pointer middle,
    bsl::allocator_traits<ALLOCATOR>::pointer last,
    ALLOCATOR allocator);
» more...

Erase a range of elements and close the gap by moving.

template<class TARGET_TYPE>
static
void
erase(
    TARGET_TYPE* first,
    TARGET_TYPE* middle,
    TARGET_TYPE* last,
    bslma::Allocator* allocator = 0);
» more...

Parameters

NameDescription
firstbeginning of the range to erase
middleend of the range to erase (one past the last)
lastend of the populated array range
allocatorallocator used to destroy elements