• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>clear</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="reverse.html" title="reverse">
10<link rel="next" href="erase.html" title="erase">
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="reverse.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="erase.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.clear"></a><a class="link" href="clear.html" title="clear">clear</a>
28</h5></div></div></div>
29<h6>
30<a name="fusion.algorithm.transformation.functions.clear.h0"></a>
31            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.description"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.description">Description</a>
32          </h6>
33<p>
34            <a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a> returns an empty sequence.
35          </p>
36<h6>
37<a name="fusion.algorithm.transformation.functions.clear.h1"></a>
38            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.synopsis"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.synopsis">Synopsis</a>
39          </h6>
40<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
41    <span class="keyword">typename</span> <span class="identifier">Sequence</span>
42    <span class="special">&gt;</span>
43<span class="keyword">typename</span> <a class="link" href="../metafunctions/clear.html" title="clear"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">clear</span></code></a><span class="special">&lt;</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">clear</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">seq</span><span class="special">);</span>
44</pre>
45<div class="table">
46<a name="fusion.algorithm.transformation.functions.clear.t0"></a><p class="title"><b>Table 1.75. Parameters</b></p>
47<div class="table-contents"><table class="table" summary="Parameters">
48<colgroup>
49<col>
50<col>
51<col>
52</colgroup>
53<thead><tr>
54<th>
55                    <p>
56                      Parameter
57                    </p>
58                  </th>
59<th>
60                    <p>
61                      Requirement
62                    </p>
63                  </th>
64<th>
65                    <p>
66                      Description
67                    </p>
68                  </th>
69</tr></thead>
70<tbody><tr>
71<td>
72                    <p>
73                      <code class="computeroutput"><span class="identifier">seq</span></code>
74                    </p>
75                  </td>
76<td>
77                    <p>
78                      A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward
79                      Sequence</a>
80                    </p>
81                  </td>
82<td>
83                    <p>
84                      Operation's argument
85                    </p>
86                  </td>
87</tr></tbody>
88</table></div>
89</div>
90<br class="table-break"><h6>
91<a name="fusion.algorithm.transformation.functions.clear.h2"></a>
92            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.expression_semantics"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.expression_semantics">Expression
93            Semantics</a>
94          </h6>
95<pre class="programlisting"><a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span>
96</pre>
97<p>
98            <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward
99            Sequence</a>.
100          </p>
101<p>
102            <span class="bold"><strong>Expression Semantics</strong></span>: Returns a sequence
103            with no elements.
104          </p>
105<h6>
106<a name="fusion.algorithm.transformation.functions.clear.h3"></a>
107            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.complexity"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.complexity">Complexity</a>
108          </h6>
109<p>
110            Constant.
111          </p>
112<h6>
113<a name="fusion.algorithm.transformation.functions.clear.h4"></a>
114            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.header"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.header">Header</a>
115          </h6>
116<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
117<span class="preprocessor">#include</span> <span class="special">&lt;</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">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
118</pre>
119<h6>
120<a name="fusion.algorithm.transformation.functions.clear.h5"></a>
121            <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.example"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.example">Example</a>
122          </h6>
123<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">());</span>
124</pre>
125</div>
126<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
127<td align="left"></td>
128<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
129      Dan Marsden, Tobias Schwinger<p>
130        Distributed under the Boost Software License, Version 1.0. (See accompanying
131        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>)
132      </p>
133</div></td>
134</tr></table>
135<hr>
136<div class="spirit-nav">
137<a accesskey="p" href="reverse.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="erase.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
138</div>
139</body>
140</html>
141