[#bsl-deque-0c-erase-0a] = xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::erase :relfileprefix: ../../ :mrdocs: Erase the half‐open range `[first, last)]` from this deque. == Synopsis Declared in `<bslstl_deque.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/iterator-02.adoc[deque<VALUE_TYPE, ALLOCATOR>::iterator] erase( xref:bsl/deque-0c/const_iterator.adoc[const_iterator] first, xref:bsl/deque-0c/const_iterator.adoc[const_iterator] last); ---- == Description Remove from this deque the sequence of elements starting at the specified `first` position and ending before the specified `last` position, and return an iterator providing modifiable access to the element immediately following the last removed element, or the position returned by the method `end` if the removed elements were last in the sequence. The behavior is undefined unless `first` is an iterator in the range `[cbegin() .. cend()]` (both endpoints included) and `last` is an iterator in the range `[first .. cend()]` (both endpoints included). == Return Value iterator to the element following the last erased element == Parameters [cols="1,4"] |=== | Name| Description | *first* | iterator to the first element to erase | *last* | iterator past the last element to erase |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#