<code>erase</code> performs a removal of one or several consequent elements in the sequence starting from an arbitrary position. The algorithm returns a new sequence which contains all the elements in the ranges <code>[begin<Sequence>::type, First)</code> and <code>[Last, end<Sequence>::type)</code>. The result sequence preserves all the functional and performance characteristics of the original <code>Sequence</code>, except its size and identity.
<tr><th> Parameter </th><th> Requirement </th><th> Description </th><th> Default value </th></tr>
<tr><td><code>Sequence</code></td><td>A model of <ahref="../Extensible_Sequence.html">Extensible Sequence</a></td><td>A sequence to handle the erase operation.</td><td></td></tr>
<tr><td><code>First</code></td><td>A model of <ahref="../Forward_Iterator.html">Forward Iterator</a></td><td>Iterator to the beginning of the range to be erased.</td><td></td></tr>
<tr><td><code>Last</code></td><td>A model of <ahref="../Forward_Iterator.html">Forward Iterator</a></td><td>Past-the-end iterator of the range to be erased.</td><td><code>typename First::next</code></td></tr>
<tr><td><code>typedef erase<Sequence,pos>::type s;</code></td><td>A model of <ahref="../Extensible_Sequence.html">Extensible Sequence</a></td><td><code>pos</code> is a dereferenceable iterator in <code>Sequence</code>.</td><td>Returns a new sequence which contains all the elements in the ranges <code>[begin<Sequence>::type, pos)</code> and <code>[next<pos>::type, end<Sequence>::type)</code>.</td><td><code>size<s>::type::value == size<Sequence>::type::value - 1</code>; the relative order of the elements in <code>s</code> is the same as in <code>Sequence</code>. </td></tr>
<tr><td><code>typedef erase<Sequence,first,last>::type s;</code></td><td>A model of <ahref="../Extensible_Sequence.html">Extensible Sequence</a></td><td><code>[first,last)</code> is a valid range in <code>Sequence</code>.</td><td>Returns a new sequence which contains all the elements in the ranges <code>[begin<Sequence>::type, first)</code> and <code>[last, end<Sequence>::type)</code>.</td><td><code>size<s>::type::value == size<Sequence>::type::value - distance<first,last>::type::value</code>; the relative order of the elements in <code>s</code> is the same as in <code>Sequence</code>. </td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
The range form has linear complexity. The complexity of single-element erase is sequence dependent (linear in the worst case, or amortized constant time).