Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / fusion / doc / html / fusion / container / generation / functions / make_set.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>make_set</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Fusion 2.2">
8 <link rel="up" href="../functions.html" title="Functions">
9 <link rel="prev" href="make_deque.html" title="make_deque">
10 <link rel="next" href="make_map.html" title="make_map">
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="make_deque.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="make_map.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.container.generation.functions.make_set"></a><a class="link" href="make_set.html" title="make_set">make_set</a>
28 </h5></div></div></div>
29 <h6>
30 <a name="fusion.container.generation.functions.make_set.h0"></a>
31             <span class="phrase"><a name="fusion.container.generation.functions.make_set.description"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.description">Description</a>
32           </h6>
33 <p>
34             Create a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a>
35             from one or more values.
36           </p>
37 <h6>
38 <a name="fusion.container.generation.functions.make_set.h1"></a>
39             <span class="phrase"><a name="fusion.container.generation.functions.make_set.synopsis"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.synopsis">Synopsis</a>
40           </h6>
41 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">&gt;</span>
42 <span class="keyword">typename</span> <a class="link" href="../metafunctions/make_set.html" title="make_set"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span></code></a><span class="special">&lt;</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">&gt;::</span><span class="identifier">type</span>
43 <span class="identifier">make_set</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">xN</span><span class="special">);</span>
44 </pre>
45 <p>
46             The variadic function accepts <code class="computeroutput"><span class="number">0</span></code>
47             to <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code>
48             elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code>
49             is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant
50             <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> before
51             including any Fusion header to change the default. Example:
52           </p>
53 <pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_SET_SIZE</span> <span class="number">20</span>
54 </pre>
55 <h6>
56 <a name="fusion.container.generation.functions.make_set.h2"></a>
57             <span class="phrase"><a name="fusion.container.generation.functions.make_set.parameters"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.parameters">Parameters</a>
58           </h6>
59 <div class="informaltable"><table class="table">
60 <colgroup>
61 <col>
62 <col>
63 <col>
64 </colgroup>
65 <thead><tr>
66 <th>
67                     <p>
68                       Parameter
69                     </p>
70                   </th>
71 <th>
72                     <p>
73                       Requirement
74                     </p>
75                   </th>
76 <th>
77                     <p>
78                       Description
79                     </p>
80                   </th>
81 </tr></thead>
82 <tbody><tr>
83 <td>
84                     <p>
85                       <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span>
86                       <span class="identifier">x1</span><span class="special">,...</span>
87                       <span class="identifier">xN</span></code>
88                     </p>
89                   </td>
90 <td>
91                     <p>
92                       Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>
93                     </p>
94                   </td>
95 <td>
96                     <p>
97                       The arguments to <code class="computeroutput"><span class="identifier">make_set</span></code>
98                     </p>
99                   </td>
100 </tr></tbody>
101 </table></div>
102 <h6>
103 <a name="fusion.container.generation.functions.make_set.h3"></a>
104             <span class="phrase"><a name="fusion.container.generation.functions.make_set.expression_semantics"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.expression_semantics">Expression
105             Semantics</a>
106           </h6>
107 <pre class="programlisting"><span class="identifier">make_set</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span>
108 </pre>
109 <p>
110             <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_set.html" title="make_set"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span></code></a><code class="computeroutput"><span class="special">&lt;</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
111           </p>
112 <p>
113             <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>.
114           </p>
115 <p>
116             <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate
117             key types.
118           </p>
119 <h6>
120 <a name="fusion.container.generation.functions.make_set.h4"></a>
121             <span class="phrase"><a name="fusion.container.generation.functions.make_set.header"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.header">Header</a>
122           </h6>
123 <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">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
124 <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">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
125 </pre>
126 <h6>
127 <a name="fusion.container.generation.functions.make_set.h5"></a>
128             <span class="phrase"><a name="fusion.container.generation.functions.make_set.example"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.example">Example</a>
129           </h6>
130 <pre class="programlisting"><span class="identifier">make_set</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">,</span> <span class="number">12.5</span><span class="special">)</span>
131 </pre>
132 <h6>
133 <a name="fusion.container.generation.functions.make_set.h6"></a>
134             <span class="phrase"><a name="fusion.container.generation.functions.make_set.see_also"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.see_also">See
135             also</a>
136           </h6>
137 <p>
138             <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a>
139           </p>
140 </div>
141 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
142 <td align="left"></td>
143 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2006, 2011, 2012 Joel de Guzman,
144       Dan Marsden, Tobias Schwinger<p>
145         Distributed under the Boost Software License, Version 1.0. (See accompanying
146         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>)
147       </p>
148 </div></td>
149 </tr></table>
150 <hr>
151 <div class="spirit-nav">
152 <a accesskey="p" href="make_deque.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="make_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
153 </div>
154 </body>
155 </html>