<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Tuple creation functions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Fusion 2.0">
<link rel="up" href="../class_template_tuple.html" title="Class template tuple">
<link rel="prev" href="construction.html" title="Construction">
<link rel="next" href="tuple_helper_classes.html" title="Tuple helper classes">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="construction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_helper_classes.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Tuple creation functions">
<div class="titlepage"><div><div><h4 class="title">
<a name="fusion.tuple.class_template_tuple.tuple_creation_functions"></a><a class="link" href="tuple_creation_functions.html" title="Tuple creation functions">Tuple
        creation functions</a>
</h4></div></div></div>
<a name="fusion.tuple.class_template_tuple.tuple_creation_functions.description"></a><h6>
<a name="id803240"></a>
          <a class="link" href="tuple_creation_functions.html#fusion.tuple.class_template_tuple.tuple_creation_functions.description">Description</a>
        </h6>
<p>
          TR1 describes 2 utility functions for creating <span class="underline">_tr1</span><span class="underline">tuple</span>_s. <code class="computeroutput"><span class="identifier">make_tuple</span></code>
          builds a tuple out of it's argument list, and <code class="computeroutput"><span class="identifier">tie</span></code>
          builds a tuple of references to it's arguments. The details of these creation
          functions are described in this section.
        </p>
<a name="fusion.tuple.class_template_tuple.tuple_creation_functions.specification"></a><h6>
<a name="id803282"></a>
          <a class="link" href="tuple_creation_functions.html#fusion.tuple.class_template_tuple.tuple_creation_functions.specification">Specification</a>
        </h6>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">&gt;</span>
<span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">V1</span><span class="special">,</span> <span class="identifier">V2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">VN</span><span class="special">&gt;</span> <span class="identifier">make_tuple</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">const</span> <span class="identifier">TN</span><span class="special">&amp;</span> <span class="identifier">tn</span><span class="special">);</span>
</pre>
<p>
          Where <code class="computeroutput"><span class="identifier">Vi</span></code> is <code class="computeroutput"><span class="identifier">X</span><span class="special">&amp;</span></code>
          if the cv-unqualified type <code class="computeroutput"><span class="identifier">Ti</span></code>
          is <code class="computeroutput"><span class="identifier">reference_wrapper</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;</span></code>,
          otherwise <code class="computeroutput"><span class="identifier">Vi</span></code> is <code class="computeroutput"><span class="identifier">Ti</span></code>.
        </p>
<p>
          <span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">V1</span><span class="special">,</span> <span class="identifier">V2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">VN</span><span class="special">&gt;(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">tN</span><span class="special">)</span></code>
        </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">&gt;</span>
<span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&amp;,</span> <span class="identifier">T2</span><span class="special">&amp;,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&amp;&gt;</span> <span class="identifier">tie</span><span class="special">(</span><span class="identifier">T1</span><span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&amp;</span> <span class="identifier">tn</span><span class="special">);</span>
</pre>
<p>
          <span class="bold"><strong>Returns</strong></span>: tuple&lt;T1&amp;, T2&amp;, ...,
          TN&amp;&gt;(t1, t2, ..., tN). When argument <code class="computeroutput"><span class="identifier">ti</span></code>
          is <code class="computeroutput"><span class="identifier">ignore</span></code>, assigning any
          value to the corresponding tuple element has has no effect.
        </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2001-2007 Joel de Guzman, Dan Marsden, Tobias
      Schwinger<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        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>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="construction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_helper_classes.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
