1 | <?xml version="1.0" encoding="utf-8" ?> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
4 | <!-- Copyright Aleksey Gurtovoy 2006. Distributed under the Boost --> |
---|
5 | <!-- Software License, Version 1.0. (See accompanying --> |
---|
6 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
---|
7 | <head> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
9 | <meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" /> |
---|
10 | <title>The MPL Reference Manual: clear</title> |
---|
11 | <link rel="stylesheet" href="../style.css" type="text/css" /> |
---|
12 | </head> |
---|
13 | <body class="docframe refmanual"> |
---|
14 | <table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./begin.html" class="navigation-link">Prev</a> <a href="./empty.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./begin.html" class="navigation-link">Back</a> <a href="./empty.html" class="navigation-link">Along</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a> <a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td> |
---|
15 | <td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./clear.html" class="navigation-link">clear</a></td> |
---|
16 | </tr></table><div class="header-separator"></div> |
---|
17 | <div class="section" id="clear"> |
---|
18 | <h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id357" name="clear">clear</a></h1> |
---|
19 | <div class="section" id="clear-synopsis"> |
---|
20 | <h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3> |
---|
21 | <pre class="literal-block"> |
---|
22 | template< |
---|
23 | typename Sequence |
---|
24 | > |
---|
25 | struct <a href="./clear.html" class="identifier">clear</a> |
---|
26 | { |
---|
27 | typedef <em>unspecified</em> type; |
---|
28 | }; |
---|
29 | </pre> |
---|
30 | </div> |
---|
31 | <div class="section" id="clear-description"> |
---|
32 | <h3><a class="subsection-title" href="#description" name="description">Description</a></h3> |
---|
33 | <p>Returns an empty sequence <a class="reference" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">Sequence</span></tt>.</p> |
---|
34 | </div> |
---|
35 | <div class="section" id="clear-header"> |
---|
36 | <h3><a class="subsection-title" href="#header" name="header">Header</a></h3> |
---|
37 | <pre class="literal-block"> |
---|
38 | #include <<a href="../../../../boost/mpl/clear.hpp" class="header">boost/mpl/clear.hpp</a>> |
---|
39 | </pre> |
---|
40 | </div> |
---|
41 | <div class="section" id="clear-model-of"> |
---|
42 | <h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3> |
---|
43 | <p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p> |
---|
44 | </div> |
---|
45 | <div class="section" id="clear-parameters"> |
---|
46 | <h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3> |
---|
47 | <table border="1" class="table"> |
---|
48 | <colgroup> |
---|
49 | <col width="17%" /> |
---|
50 | <col width="39%" /> |
---|
51 | <col width="44%" /> |
---|
52 | </colgroup> |
---|
53 | <thead valign="bottom"> |
---|
54 | <tr><th>Parameter</th> |
---|
55 | <th>Requirement</th> |
---|
56 | <th>Description</th> |
---|
57 | </tr> |
---|
58 | </thead> |
---|
59 | <tbody valign="top"> |
---|
60 | <tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td> |
---|
61 | <td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or |
---|
62 | <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td> |
---|
63 | <td>A sequence to get an empty "copy" of.</td> |
---|
64 | </tr> |
---|
65 | </tbody> |
---|
66 | </table> |
---|
67 | </div> |
---|
68 | <div class="section" id="clear-expression-semantics"> |
---|
69 | <h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3> |
---|
70 | <p>For any <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p> |
---|
71 | <pre class="literal-block"> |
---|
72 | typedef <a href="./clear.html" class="identifier">clear</a><s>::type t; |
---|
73 | </pre> |
---|
74 | <table class="field-list" frame="void" rules="none"> |
---|
75 | <col class="field-name" /> |
---|
76 | <col class="field-body" /> |
---|
77 | <tbody valign="top"> |
---|
78 | <tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>.</td> |
---|
79 | </tr> |
---|
80 | <tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p> |
---|
81 | <pre class="last literal-block"> |
---|
82 | typedef <a href="./erase.html" class="identifier">erase</a>< s, <a href="./begin.html" class="identifier">begin</a><s>::type, <a href="./end.html" class="identifier">end</a><s>::type >::type t; |
---|
83 | </pre> |
---|
84 | </td> |
---|
85 | </tr> |
---|
86 | <tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a><s>::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</td> |
---|
87 | </tr> |
---|
88 | </tbody> |
---|
89 | </table> |
---|
90 | </div> |
---|
91 | <div class="section" id="clear-complexity"> |
---|
92 | <h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3> |
---|
93 | <p>Amortized constant time.</p> |
---|
94 | </div> |
---|
95 | <div class="section" id="clear-example"> |
---|
96 | <h3><a class="subsection-title" href="#example" name="example">Example</a></h3> |
---|
97 | <pre class="literal-block"> |
---|
98 | typedef <a href="./vector-c.html" class="identifier">vector_c</a><int,1,3,5,7,9,11> odds; |
---|
99 | typedef <a href="./clear.html" class="identifier">clear</a><odds>::type nothing; |
---|
100 | |
---|
101 | <a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./empty.html" class="identifier">empty</a><nothing> )); |
---|
102 | </pre> |
---|
103 | </div> |
---|
104 | <div class="section" id="clear-see-also"> |
---|
105 | <h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3> |
---|
106 | <p><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>, <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>, <a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a></p> |
---|
107 | <!-- modtime: November 13, 2004 01:25:47 +0000 --> |
---|
108 | <!-- Sequences/Intrinsic Metafunctions//empty --> |
---|
109 | </div> |
---|
110 | </div> |
---|
111 | |
---|
112 | <div class="footer-separator"></div> |
---|
113 | <table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./begin.html" class="navigation-link">Prev</a> <a href="./empty.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./begin.html" class="navigation-link">Back</a> <a href="./empty.html" class="navigation-link">Along</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a> <a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td> |
---|
114 | </tr></table></body> |
---|
115 | </html> |
---|