tuple_to_array.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <html>
  2. <head>
  3. <title>BOOST_PP_TUPLE_TO_ARRAY</title>
  4. <link rel="stylesheet" type="text/css" href="../styles.css">
  5. </head>
  6. <body>
  7. <div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_ARRAY</b>
  8. macro
  9. converts a <i>tuple</i> to an <i>array</i>. </div>
  10. <h4> Usage </h4>
  11. <div class="code"> <b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>size,tuple</i>)<br>
  12. <br>
  13. or<br>
  14. <br>
  15. <b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
  16. </div>
  17. <h4> Arguments </h4>
  18. <dl>
  19. <dt>size</dt>
  20. <dd> The size of the <i>tuple</i>.&nbsp; Valid <i>tuple</i> sizes
  21. range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>. <br>
  22. </dd>
  23. <dt>tuple</dt>
  24. <dd> The <i>tuple</i> to be converted.</dd>
  25. </dl>
  26. <h4>Remarks</h4>
  27. <div>
  28. The <i>size</i> argument must be the actual size of the <i>tuple</i>.<br>
  29. <br>
  30. You can
  31. invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_TO_ARRAY(<i>tuple</i>) or
  32. BOOST_PP_TUPLE_TO_ARRAY(<i>size</i>,<i>tuple</i>).<a href="../headers/seq/to_array.html"></a>
  33. </div>
  34. <h4> Requirements </h4>
  35. <div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_array.html">&lt;boost/preprocessor/tuple/to_array.hpp&gt;</a>
  36. </div>
  37. <h4> Sample Code </h4>
  38. <div>
  39. <pre>#include &lt;<a href="../headers/tuple/to_array.html">boost/preprocessor/tuple/to_array.hpp</a>&gt;<br><br>#define TUPLE (a,b,c)<br><br><a href="tuple_to_array.html">BOOST_PP_TUPLE_TO_ARRAY</a>(3,TUPLE) // expands to (3, (a, b, c))<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_to_array.html">BOOST_PP_TUPLE_TO_ARRAY</a>(TUPLE) // expands to (3, (a, b, c))<br></pre>
  40. </div>
  41. <hr size="1">
  42. <div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2011,2013</i>
  43. </div>
  44. <div style="margin-left: 0px;">
  45. <p><small>Distributed under the Boost Software License, Version 1.0.
  46. (See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
  47. or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  48. </div>
  49. </body>
  50. </html>