1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>erase_key</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. Fusion 2.2"> 8<link rel="up" href="../functions.html" title="Functions"> 9<link rel="prev" href="erase.html" title="erase"> 10<link rel="next" href="insert.html" title="insert"> 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="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.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="insert.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="fusion.algorithm.transformation.functions.erase_key"></a><a class="link" href="erase_key.html" title="erase_key">erase_key</a> 28</h5></div></div></div> 29<h6> 30<a name="fusion.algorithm.transformation.functions.erase_key.h0"></a> 31 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.description"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.description">Description</a> 32 </h6> 33<p> 34 For an <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">associative</a> 35 <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> 36 <code class="computeroutput"><span class="identifier">seq</span></code>, returns a <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">associative</a> 37 <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> 38 containing all the elements of the original except those with a given 39 key. 40 </p> 41<h6> 42<a name="fusion.algorithm.transformation.functions.erase_key.h1"></a> 43 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.synopsis"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.synopsis">Synopsis</a> 44 </h6> 45<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> 46 <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> 47 <span class="keyword">typename</span> <span class="identifier">Sequence</span> 48 <span class="special">></span> 49<span class="keyword">typename</span> <a class="link" href="../metafunctions/erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">erase_key</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> 50</pre> 51<div class="table"> 52<a name="fusion.algorithm.transformation.functions.erase_key.t0"></a><p class="title"><b>Table 1.77. Parameters</b></p> 53<div class="table-contents"><table class="table" summary="Parameters"> 54<colgroup> 55<col> 56<col> 57<col> 58</colgroup> 59<thead><tr> 60<th> 61 <p> 62 Parameter 63 </p> 64 </th> 65<th> 66 <p> 67 Requirement 68 </p> 69 </th> 70<th> 71 <p> 72 Description 73 </p> 74 </th> 75</tr></thead> 76<tbody> 77<tr> 78<td> 79 <p> 80 <code class="computeroutput"><span class="identifier">seq</span></code> 81 </p> 82 </td> 83<td> 84 <p> 85 A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward 86 Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative 87 Sequence</a> 88 </p> 89 </td> 90<td> 91 <p> 92 Operation's argument 93 </p> 94 </td> 95</tr> 96<tr> 97<td> 98 <p> 99 <code class="computeroutput"><span class="identifier">Key</span></code> 100 </p> 101 </td> 102<td> 103 <p> 104 Any type 105 </p> 106 </td> 107<td> 108 <p> 109 Key to erase 110 </p> 111 </td> 112</tr> 113</tbody> 114</table></div> 115</div> 116<br class="table-break"><h6> 117<a name="fusion.algorithm.transformation.functions.erase_key.h2"></a> 118 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.expression_semantics"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.expression_semantics">Expression 119 Semantics</a> 120 </h6> 121<pre class="programlisting"><a class="link" href="erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="identifier">Key</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> 122</pre> 123<p> 124 <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward 125 Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative 126 Sequence</a>. 127 </p> 128<p> 129 <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing 130 all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, 131 except those with key <code class="computeroutput"><span class="identifier">Key</span></code>. 132 </p> 133<h6> 134<a name="fusion.algorithm.transformation.functions.erase_key.h3"></a> 135 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.complexity"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.complexity">Complexity</a> 136 </h6> 137<p> 138 Constant. Returns a view which is lazily evaluated. 139 </p> 140<h6> 141<a name="fusion.algorithm.transformation.functions.erase_key.h4"></a> 142 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.header"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.header">Header</a> 143 </h6> 144<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 145<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 146</pre> 147<h6> 148<a name="fusion.algorithm.transformation.functions.erase_key.h5"></a> 149 <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.example"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.example">Example</a> 150 </h6> 151<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><a class="link" href="../../../container/generation/functions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">make_map</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">>(</span><span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">make_map</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><span class="char">'b'</span><span class="special">));</span> 152</pre> 153</div> 154<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 155<td align="left"></td> 156<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, 157 Dan Marsden, Tobias Schwinger<p> 158 Distributed under the Boost Software License, Version 1.0. (See accompanying 159 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>) 160 </p> 161</div></td> 162</tr></table> 163<hr> 164<div class="spirit-nav"> 165<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.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="insert.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 166</div> 167</body> 168</html> 169