3 <meta content=
"text/html; charset=windows-1252" http-equiv=
"content-type">
4 <title>tuples.html
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
9 <div> A
<i>tuple
</i> is a simple comma-separated list of elements inside
10 parenthesis.
For example,
</div>
11 <div class=
"code"> (
<i>a
</i>,
<i>b
</i>,
<i>c
</i>)
</div>
12 <div> ...is a
<i>tuple
</i> of
<i>3</i> elements--
<i>a
</i>,
<i>b
</i>, and
15 A
<i>tuple
</i>cannot be empty. The notation '()' as a
<i>tuple
</i>is
16 a single element
<i>tuple
</i>of size
1, where the element is empty.
</div>
17 <div> <i>Tuples
</i> are fast and easy to use.
With variadic macro
18 support it is not necessary to know the size of a
<i>tuple;
</i>without
19 variadic macro support
all access to
<i>tuples
</i> requires
20 knowledge of its size. Use a
<i>tuple
</i>instead of an
<i>array
</i> if
21 your compiler supports variadic macros, since a
<i>tuple
</i>has all of
22 the functionality as an
<i>array
</i>and is easier syntactically to use.
23 The only functionality an
<i>array
</i>has which a
<i>tuple
</i>does
24 not have is that an
<i>array
</i>can be empty whereas a
<i>tuple
</i>cannot
26 <div> Elements of a
<i>tuple
</i> can be extracted with
<b>BOOST_PP_TUPLE_ELEM
</b>.
30 <li><a href=
"../ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM
</a></li>
33 <div style=
"margin-left: 0px;"> <i>© Copyright
<a href=
"http://www.housemarque.com"
34 target=
"_top">Housemarque Oy
</a> 2002</i> <br>
35 <i>© Copyright Paul Mensonides
2002</i> </div>
36 <div style=
"margin-left: 0px;">
37 <p><small>Distributed under the Boost Software License, Version
1.0. (See
38 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a>
39 or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>