• 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</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="push_front.html" title="push_front">
10<link rel="next" href="remove_erase_if.html" title="remove_erase_if">
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="push_front.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="remove_erase_if.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"></a><a class="link" href="remove_erase.html" title="remove_erase">remove_erase</a>
28</h5></div></div></div>
29<h6>
30<a name="range.reference.algorithms.new.remove_erase.h0"></a>
31            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase.prototype"></a></span><a class="link" href="remove_erase.html#range.reference.algorithms.new.remove_erase.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">Value</span><span class="special">&gt;</span>
36<span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">remove_erase</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="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">);</span>
38</pre>
39<p>
40          </p>
41<h6>
42<a name="range.reference.algorithms.new.remove_erase.h1"></a>
43            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase.description"></a></span><a class="link" href="remove_erase.html#range.reference.algorithms.new.remove_erase.description">Description</a>
44          </h6>
45<p>
46            <code class="computeroutput"><span class="identifier">remove_erase</span></code> actually
47            eliminates the elements equal to <code class="computeroutput"><span class="identifier">value</span></code>
48            from the container. This is in contrast to the <code class="computeroutput"><span class="identifier">remove</span></code>
49            algorithm which merely rearranges elements.
50          </p>
51<h6>
52<a name="range.reference.algorithms.new.remove_erase.h2"></a>
53            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase.definition"></a></span><a class="link" href="remove_erase.html#range.reference.algorithms.new.remove_erase.definition">Definition</a>
54          </h6>
55<p>
56            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>
57          </p>
58<h6>
59<a name="range.reference.algorithms.new.remove_erase.h3"></a>
60            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase.requirements"></a></span><a class="link" href="remove_erase.html#range.reference.algorithms.new.remove_erase.requirements">Requirements</a>
61          </h6>
62<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
63                <code class="computeroutput"><span class="identifier">Container</span></code> supports
64                erase of an iterator range.
65              </li></ol></div>
66<h6>
67<a name="range.reference.algorithms.new.remove_erase.h4"></a>
68            <span class="phrase"><a name="range.reference.algorithms.new.remove_erase.complexity"></a></span><a class="link" href="remove_erase.html#range.reference.algorithms.new.remove_erase.complexity">Complexity</a>
69          </h6>
70<p>
71            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.
72          </p>
73</div>
74<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
75<td align="left"></td>
76<td align="right"><div class="copyright-footer">Copyright © 2003-2010 Thorsten Ottosen,
77      Neil Groves<p>
78        Distributed under the Boost Software License, Version 1.0. (See accompanying
79        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>)
80      </p>
81</div></td>
82</tr></table>
83<hr>
84<div class="spirit-nav">
85<a accesskey="p" href="push_front.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="remove_erase_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
86</div>
87</body>
88</html>
89