]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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:remove_erase_if remove_erase_if] | |
7 | ||
8 | [heading Prototype] | |
9 | ||
10 | `` | |
11 | template<class Container, class Pred> | |
12 | Container& remove_erase_if(Container& target, | |
13 | Pred pred); | |
14 | `` | |
15 | ||
16 | [heading Description] | |
17 | ||
18 | `remove_erase_if` removes the elements `x` that satisfy `pred(x)` from the container. | |
19 | This is in contrast to the `erase` algorithm which merely rearranges elements. | |
20 | ||
21 | [heading Definition] | |
22 | ||
23 | Defined in the header file `boost/range/algorithm_ext/erase.hpp` | |
24 | ||
25 | [heading Requirements] | |
26 | ||
27 | # `Container` supports erase of an iterator range. | |
28 | # `Pred` is a model of the `Predicate` Concept. | |
29 | ||
30 | [heading Complexity] | |
31 | ||
32 | Linear. Proportional to `distance(target)`s. | |
33 | ||
34 | [endsect] |