[#BloombergLP-bslalg-DequePrimitives-01-erase-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/DequePrimitives-01.adoc[DequePrimitives]::erase :relfileprefix: ../../../ :mrdocs: `erase` overloads == Synopses Declared in `<bslalg_dequeprimitives.h>` Call the destructor on each of the elements of a deque of parameterized `VALUE_TYPE` in the specified range `[first .. last)]`. Shift the elements to fill up the empty space after the erasure, using the smaller of the range defined by `[fromBegin .. first)]` and `[last .. fromEnd)]` 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::Iterator] xref:BloombergLP/bslalg/DequePrimitives-01/erase-0f.adoc[erase]( xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toEnd, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] first, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] last, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromEnd, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/DequePrimitives-01/erase-0f.adoc[_» more..._]# Same as the preceding `erase` overload for bitwise‐copyable types. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::Iterator] xref:BloombergLP/bslalg/DequePrimitives-01/erase-05.adoc[erase]( xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toEnd, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] first, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] last, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromEnd, ALLOCATOR allocator, xref:bsl/integral_constant-02.adoc[bsl::integral_constant<int, BSLALG_DEQUEPRIMITIVES_BITWISE_COPYABLE_TRAITS>]); ---- [.small]#xref:BloombergLP/bslalg/DequePrimitives-01/erase-05.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::Iterator] xref:BloombergLP/bslalg/DequePrimitives-01/erase-08.adoc[erase]( xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator]* toEnd, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromBegin, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] first, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] last, xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[Iterator] fromEnd, ALLOCATOR allocator, xref:bsl/integral_constant-02.adoc[bsl::integral_constant<int, BSLALG_DEQUEPRIMITIVES_NIL_TRAITS>]); ---- [.small]#xref:BloombergLP/bslalg/DequePrimitives-01/erase-08.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#