• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>remove_erase_if</title>
5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Chapter 1. Range 2.0">
8<link rel="up" href="../new.html" title="New algorithms">
9<link rel="prev" href="remove_erase.html" title="remove_erase">
10<link rel="next" href="../numeric.html" title="Numeric algorithms">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="remove_erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../new.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="range.reference.algorithms.new.remove_erase_if"></a><a class="link" href="remove_erase_if.html" title="remove_erase_if">remove_erase_if</a>
28</h5></div></div></div>
29<h6>
30<a name="range.reference.algorithms.new.remove_erase_if.h0"></a>
31            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase_if.prototype"></a></span><a class="link" href="remove_erase_if.html#range.reference.algorithms.new.remove_erase_if.prototype">Prototype</a>
32          </h6>
33<p>
34</p>
35<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Pred</span><span class="special">&gt;</span>
36<span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">remove_erase_if</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
37                           <span class="identifier">Pred</span> <span class="identifier">pred</span><span class="special">);</span>
38</pre>
39<p>
40          </p>
41<h6>
42<a name="range.reference.algorithms.new.remove_erase_if.h1"></a>
43            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase_if.description"></a></span><a class="link" href="remove_erase_if.html#range.reference.algorithms.new.remove_erase_if.description">Description</a>
44          </h6>
45<p>
46            <code class="computeroutput"><span class="identifier">remove_erase_if</span></code> removes
47            the elements <code class="computeroutput"><span class="identifier">x</span></code> that satisfy
48            <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
49            from the container. This is in contrast to the <code class="computeroutput"><span class="identifier">erase</span></code>
50            algorithm which merely rearranges elements.
51          </p>
52<h6>
53<a name="range.reference.algorithms.new.remove_erase_if.h2"></a>
54            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase_if.definition"></a></span><a class="link" href="remove_erase_if.html#range.reference.algorithms.new.remove_erase_if.definition">Definition</a>
55          </h6>
56<p>
57            Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span></code>
58          </p>
59<h6>
60<a name="range.reference.algorithms.new.remove_erase_if.h3"></a>
61            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase_if.requirements"></a></span><a class="link" href="remove_erase_if.html#range.reference.algorithms.new.remove_erase_if.requirements">Requirements</a>
62          </h6>
63<div class="orderedlist"><ol class="orderedlist" type="1">
64<li class="listitem">
65                <code class="computeroutput"><span class="identifier">Container</span></code> supports
66                erase of an iterator range.
67              </li>
68<li class="listitem">
69                <code class="computeroutput"><span class="identifier">Pred</span></code> is a model of
70                the <code class="computeroutput"><span class="identifier">Predicate</span></code> Concept.
71              </li>
72</ol></div>
73<h6>
74<a name="range.reference.algorithms.new.remove_erase_if.h4"></a>
75            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase_if.complexity"></a></span><a class="link" href="remove_erase_if.html#range.reference.algorithms.new.remove_erase_if.complexity">Complexity</a>
76          </h6>
77<p>
78            Linear. Proportional to <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">target</span><span class="special">)</span></code>s.
79          </p>
80</div>
81<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
82<td align="left"></td>
83<td align="right"><div class="copyright-footer">Copyright © 2003-2010 Thorsten Ottosen,
84      Neil Groves<p>
85        Distributed under the Boost Software License, Version 1.0. (See accompanying
86        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
87      </p>
88</div></td>
89</tr></table>
90<hr>
91<div class="spirit-nav">
92<a accesskey="p" href="remove_erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../new.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
93</div>
94</body>
95</html>
96