Imported Upstream version 1.51.0
[platform/upstream/boost.git] / libs / fusion / doc / html / fusion / container / generation / functions / make_vector.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>make_vector</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Fusion 2.1">
8 <link rel="up" href="../functions.html" title="Functions">
9 <link rel="prev" href="make_cons.html" title="make_cons">
10 <link rel="next" href="make_deque.html" title="make_deque">
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_cons.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_deque.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_vector"></a><a class="link" href="make_vector.html" title="make_vector">make_vector</a>
28 </h5></div></div></div>
29 <h6>
30 <a name="fusion.container.generation.functions.make_vector.h0"></a>
31             <span><a name="fusion.container.generation.functions.make_vector.description"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.description">Description</a>
32           </h6>
33 <p>
34             Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>
35             from one or more values.
36           </p>
37 <h6>
38 <a name="fusion.container.generation.functions.make_vector.h1"></a>
39             <span><a name="fusion.container.generation.functions.make_vector.synopsis"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.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_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</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_vector</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_VECTOR_SIZE</span></code>
48             elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_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_VECTOR_SIZE</span></code>
51             before 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_VECTOR_SIZE</span> <span class="number">20</span>
54 </pre>
55 <h6>
56 <a name="fusion.container.generation.functions.make_vector.h2"></a>
57             <span><a name="fusion.container.generation.functions.make_vector.parameters"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.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_vector</span></code>
98                     </p>
99                   </td>
100 </tr></tbody>
101 </table></div>
102 <h6>
103 <a name="fusion.container.generation.functions.make_vector.h3"></a>
104             <span><a name="fusion.container.generation.functions.make_vector.expression_semantics"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.expression_semantics">Expression
105             Semantics</a>
106           </h6>
107 <pre class="programlisting"><span class="identifier">make_vector</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_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</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="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</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 <h6>
116 <a name="fusion.container.generation.functions.make_vector.h4"></a>
117             <span><a name="fusion.container.generation.functions.make_vector.header"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.header">Header</a>
118           </h6>
119 <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_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
120 <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_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
121 </pre>
122 <h6>
123 <a name="fusion.container.generation.functions.make_vector.h5"></a>
124             <span><a name="fusion.container.generation.functions.make_vector.example"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.example">Example</a>
125           </h6>
126 <pre class="programlisting"><span class="identifier">make_vector</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>
127 </pre>
128 <h6>
129 <a name="fusion.container.generation.functions.make_vector.h6"></a>
130             <span><a name="fusion.container.generation.functions.make_vector.see_also"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.see_also">See
131             also</a>
132           </h6>
133 <p>
134             <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>
135           </p>
136 </div>
137 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
138 <td align="left"></td>
139 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2006, 2011, 2012 Joel de Guzman,
140       Dan Marsden, Tobias Schwinger<p>
141         Distributed under the Boost Software License, Version 1.0. (See accompanying
142         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>)
143       </p>
144 </div></td>
145 </tr></table>
146 <hr>
147 <div class="spirit-nav">
148 <a accesskey="p" href="make_cons.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_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
149 </div>
150 </body>
151 </html>