]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
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"> | |
6 | </head> | |
7 | <body> | |
8 | <h4>Tuples</h4> | |
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 | |
13 | <i>c</i>.<br> | |
14 | <br> | |
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 | |
25 | be empty.</div> | |
26 | <div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>. | |
27 | </div> | |
28 | <h4>Primitives</h4> | |
29 | <ul> | |
30 | <li><a href="../ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a></li> | |
31 | </ul> | |
32 | <hr size="1"> | |
33 |