2007-11-25 18:38:02 +00:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" >
< title > Construction< / title >
< link rel = "stylesheet" href = "../../../../../../../doc/html/boostbook.css" type = "text/css" >
2008-07-08 02:43:21 +00:00
< meta name = "generator" content = "DocBook XSL Stylesheets V1.66.1" >
2007-11-25 18:38:02 +00:00
< link rel = "start" href = "../../../index.html" title = "Chapter<65> 1.<2E> Fusion 2.0" >
< link rel = "up" href = "../class_template_tuple.html" title = "Class template tuple" >
< link rel = "prev" href = "../class_template_tuple.html" title = "Class template tuple" >
2008-07-08 02:43:21 +00:00
< link rel = "next" href = "tuple_creation_functions.html" title = "Tuple
creation functions">
2007-11-25 18:38:02 +00:00
< / 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 >
2008-07-17 23:59:40 +00:00
< td align = "center" > < a href = "../../../../../../../index.html" > Home< / a > < / td >
2007-11-25 18:38:02 +00:00
< td align = "center" > < a href = "../../../../../../libraries.htm" > Libraries< / a > < / td >
2008-07-17 23:59:40 +00:00
< 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 >
2007-11-25 18:38:02 +00:00
< td align = "center" > < a href = "../../../../../../../more/index.htm" > More< / a > < / td >
< / tr > < / table >
< hr >
< div class = "spirit-nav" >
< a accesskey = "p" href = "../class_template_tuple.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_creation_functions.html" > < img src = "../../../../../../../doc/html/images/next.png" alt = "Next" > < / a >
< / div >
< div class = "section" lang = "en" >
< div class = "titlepage" > < div > < div > < h4 class = "title" >
2008-07-08 02:43:21 +00:00
< a name = "fusion.tuple.class_template_tuple.construction" > < / a > < a href = "construction.html" title = "Construction" > Construction< / a > < / h4 > < / div > < / div > < / div >
< a name = "fusion.tuple.class_template_tuple.construction.description" > < / a > < h5 >
2008-07-22 02:06:42 +00:00
< a name = "id636788" > < / a >
2008-07-08 02:43:21 +00:00
< a href = "construction.html#fusion.tuple.class_template_tuple.construction.description" > Description< / a >
< / h5 >
2007-11-25 18:38:02 +00:00
< p >
The < a href = "http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target = "_top" > TR1
Tuple< / a > type provides a default constructor, a constructor that takes
initializers for all of its elements, a copy constructor, and a converting
copy constructor. The details of the various constructors are described
in this section.
< / p >
2008-07-08 02:43:21 +00:00
< a name = "fusion.tuple.class_template_tuple.construction.specification" > < / a > < h5 >
2008-07-22 02:06:42 +00:00
< a name = "id636833" > < / a >
2008-07-08 02:43:21 +00:00
< a href = "construction.html#fusion.tuple.class_template_tuple.construction.specification" > Specification< / a >
< / h5 >
2007-11-25 18:38:02 +00:00
< div class = "variablelist" >
< p class = "title" > < b > Notation< / b > < / p >
< dl >
2008-07-08 02:43:21 +00:00
< dt > < span class = "term" > < tt class = "computeroutput" > < span class = "identifier" > T1< / span >
< span class = "special" > ...< / span > < span class = "identifier" > TN< / span > < / tt > ,
< tt class = "computeroutput" > < span class = "identifier" > U1< / span > < span class = "special" > ...< / span >
< span class = "identifier" > UN< / span > < / tt > < / span > < / dt >
2007-11-25 18:38:02 +00:00
< dd > < p >
Tuple element types
< / p > < / dd >
2008-07-08 02:43:21 +00:00
< dt > < span class = "term" > < tt class = "computeroutput" > < span class = "identifier" > P1< / span >
< span class = "special" > ...< / span > < span class = "identifier" > PN< / span > < / tt > < / span > < / dt >
2007-11-25 18:38:02 +00:00
< dd > < p >
Parameter types
< / p > < / dd >
2008-07-08 02:43:21 +00:00
< dt > < span class = "term" > < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt > ,
< tt class = "computeroutput" > < span class = "identifier" > Ui< / span > < / tt > < / span > < / dt >
2007-11-25 18:38:02 +00:00
< dd > < p >
2008-07-08 02:43:21 +00:00
The type of the < tt class = "computeroutput" > < span class = "identifier" > i< / span > < / tt > th
2007-11-25 18:38:02 +00:00
element of a tuple
< / p > < / dd >
2008-07-08 02:43:21 +00:00
< dt > < span class = "term" > < tt class = "computeroutput" > < span class = "identifier" > Pi< / span > < / tt > < / span > < / dt >
2007-11-25 18:38:02 +00:00
< dd > < p >
2008-07-08 02:43:21 +00:00
The type of the < tt class = "computeroutput" > < span class = "identifier" > i< / span > < / tt > th
2007-11-25 18:38:02 +00:00
parameter
< / p > < / dd >
< / dl >
< / div >
< pre class = "programlisting" >
< span class = "identifier" > tuple< / span > < span class = "special" > ();< / span >
< / pre >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Requirements< / b > < / span > : Each < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt >
2007-11-25 18:38:02 +00:00
is default constructable.
< / p >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Semantics< / b > < / span > : Default initializes each element
2007-11-25 18:38:02 +00:00
of the tuple.
< / p >
< pre class = "programlisting" >
< span class = "identifier" > tuple< / span > < span class = "special" > (< / span > < span class = "identifier" > P1< / span > < span class = "special" > ,< / span > < span class = "identifier" > P2< / span > < span class = "special" > ,...,< / span > < span class = "identifier" > PN< / span > < span class = "special" > );< / span >
< / pre >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Requirements< / b > < / span > : Each < tt class = "computeroutput" > < span class = "identifier" > Pi< / span > < / tt >
is < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt > if < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt > is a reference type, < tt class = "computeroutput" > < span class = "keyword" > const< / span > < span class = "identifier" > Ti< / span > < span class = "special" > & < / span > < / tt > otherwise.
2007-11-25 18:38:02 +00:00
< / p >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Semantics< / b > < / span > : Copy initializes each element
2007-11-25 18:38:02 +00:00
with the corresponding parameter.
< / p >
< pre class = "programlisting" >
< span class = "identifier" > tuple< / span > < span class = "special" > (< / span > < span class = "keyword" > const< / span > < span class = "identifier" > tuple< / span > < span class = "special" > & < / span > < span class = "identifier" > t< / span > < span class = "special" > );< / span >
< / pre >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Requirements< / b > < / span > : Each < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt >
2007-11-25 18:38:02 +00:00
should be copy constructable.
< / p >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Semantics< / b > < / span > : Copy constructs each element
of < tt class = "computeroutput" > < span class = "special" > *< / span > < span class = "keyword" > this< / span > < / tt >
with the corresponding element of < tt class = "computeroutput" > < span class = "identifier" > t< / span > < / tt > .
2007-11-25 18:38:02 +00:00
< / p >
< pre class = "programlisting" >
< span class = "keyword" > template< / span > < span class = "special" > < < / span > < span class = "keyword" > typename< / span > < span class = "identifier" > U1< / span > < span class = "special" > ,< / span > < span class = "keyword" > typename< / span > < span class = "identifier" > U2< / span > < span class = "special" > ,< / span > < span class = "special" > ...,< / span > < span class = "keyword" > typename< / span > < span class = "identifier" > UN< / span > < span class = "special" > > < / span >
< span class = "identifier" > tuple< / span > < span class = "special" > (< / span > < span class = "keyword" > const< / span > < span class = "identifier" > tuple< / span > < span class = "special" > < < / span > < span class = "identifier" > U1< / span > < span class = "special" > ,< / span > < span class = "identifier" > U2< / span > < span class = "special" > ,< / span > < span class = "special" > ...,< / span > < span class = "identifier" > UN< / span > < span class = "special" > > & < / span > < span class = "identifier" > t< / span > < span class = "special" > );< / span >
< / pre >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Requirements< / b > < / span > : Each < tt class = "computeroutput" > < span class = "identifier" > Ti< / span > < / tt >
shall be constructible from the corresponding < tt class = "computeroutput" > < span class = "identifier" > Ui< / span > < / tt > .
2007-11-25 18:38:02 +00:00
< / p >
< p >
2008-07-08 02:43:21 +00:00
< span class = "bold" > < b > Semantics< / b > < / span > : Constructs each element of
< tt class = "computeroutput" > < span class = "special" > *< / span > < span class = "keyword" > this< / span > < / tt >
with the corresponding element of < tt class = "computeroutput" > < span class = "identifier" > t< / span > < / tt > .
2007-11-25 18:38:02 +00:00
< / 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 <20> 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 = "../class_template_tuple.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_creation_functions.html" > < img src = "../../../../../../../doc/html/images/next.png" alt = "Next" > < / a >
< / div >
< / body >
< / html >