• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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.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="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 class="phrase"><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 class="phrase"><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            For C++11 compilers, the variadic function interface has no upper bound.
47          </p>
48<p>
49            For C++03 compilers, the variadic function accepts <code class="computeroutput"><span class="number">0</span></code>
50            to <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code>
51            elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code>
52            is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant
53            <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code>
54            before including any Fusion header to change the default. Example:
55          </p>
56<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span>
57</pre>
58<h6>
59<a name="fusion.container.generation.functions.make_vector.h2"></a>
60            <span class="phrase"><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>
61          </h6>
62<div class="informaltable"><table class="table">
63<colgroup>
64<col>
65<col>
66<col>
67</colgroup>
68<thead><tr>
69<th>
70                    <p>
71                      Parameter
72                    </p>
73                  </th>
74<th>
75                    <p>
76                      Requirement
77                    </p>
78                  </th>
79<th>
80                    <p>
81                      Description
82                    </p>
83                  </th>
84</tr></thead>
85<tbody><tr>
86<td>
87                    <p>
88                      <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span>
89                      <span class="identifier">x1</span><span class="special">,...</span>
90                      <span class="identifier">xN</span></code>
91                    </p>
92                  </td>
93<td>
94                    <p>
95                      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>
96                    </p>
97                  </td>
98<td>
99                    <p>
100                      The arguments to <code class="computeroutput"><span class="identifier">make_vector</span></code>
101                    </p>
102                  </td>
103</tr></tbody>
104</table></div>
105<h6>
106<a name="fusion.container.generation.functions.make_vector.h3"></a>
107            <span class="phrase"><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
108            Semantics</a>
109          </h6>
110<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>
111</pre>
112<p>
113            <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>
114          </p>
115<p>
116            <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>.
117          </p>
118<h6>
119<a name="fusion.container.generation.functions.make_vector.h4"></a>
120            <span class="phrase"><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>
121          </h6>
122<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>
123<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>
124</pre>
125<h6>
126<a name="fusion.container.generation.functions.make_vector.h5"></a>
127            <span class="phrase"><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>
128          </h6>
129<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>
130</pre>
131<h6>
132<a name="fusion.container.generation.functions.make_vector.h6"></a>
133            <span class="phrase"><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
134            also</a>
135          </h6>
136<p>
137            <a class="link" href="../../../notes.html#fusion.notes.reference_wrappers"><code class="computeroutput"><span class="identifier">Reference</span>
138            <span class="identifier">Wrappers</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 © 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_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>
153</div>
154</body>
155</html>
156