1[/
2    Copyright 2010 Neil Groves
3    Distributed under the Boost Software License, Version 1.0.
4    (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5/]
6[section:erase erase]
7
8[heading Prototype]
9
10``
11template<class Container>
12Container& erase(
13    Container& target,
14    iterator_range<typename Container::iterator> to_erase);
15``
16
17[heading Description]
18
19`erase` the iterator range `to_erase` from the container `target`.
20
21`remove_erase` performs the frequently used combination equivalent to `target.erase(std::remove(target.begin(), target.end(), value), target.end());`
22
23`remove_erase_if` performs the frequently used combination equivalent to `target.erase(std::remove_if(target.begin(), target.end(), pred), target.end());`
24
25[heading Definition]
26
27Defined in the header file `boost/range/algorithm_ext/erase.hpp`
28
29[heading Requirements]
30
31# `Container` supports erase of an iterator range.
32
33[heading Complexity]
34
35Linear. Proprotional to `distance(to_erase)`.
36
37[endsect]
38