tuple_remove.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <html>
  2. <head>
  3. <meta content="text/html; charset=windows-1252" http-equiv="content-type">
  4. <title>BOOST_PP_TUPLE_REMOVE</title>
  5. <link rel="stylesheet" type="text/css" href="../styles.css">
  6. </head>
  7. <body>
  8. <div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REMOVE</b> macro
  9. removes an element from a <i>tuple</i>.</div>
  10. <h4>Usage</h4>
  11. <div class="code"> <b>BOOST_PP_TUPLE_REMOVE</b>(<i>tuple</i>, <i>i</i>) <a
  12. href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
  13. <h4>Arguments</h4>
  14. <dl>
  15. <dt>tuple</dt>
  16. <dd> The <i>tuple</i> from which an element is to be removed.</dd>
  17. <dt>i</dt>
  18. <dd> The zero-based position in <i>tuple</i> of the element to be
  19. removed.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>)
  20. - <i>1</i>. If <i>tuple</i> has only a single element, it remains
  21. unchanged since a&nbsp;<i>tuple </i>must have at least one element.</dd>
  22. </dl>
  23. <h4>Remarks</h4>
  24. <div> This macro uses <b>BOOST_PP_WHILE</b> interally.&nbsp; Therefore, to
  25. use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
  26. see <b>BOOST_PP_TUPLE_REMOVE_D</b>.</div>
  27. <h4>See Also</h4>
  28. <ul>
  29. <li><a href="tuple_remove_d.html">BOOST_PP_TUPLE_REMOVE_D</a></li>
  30. </ul>
  31. <h4>Requirements</h4>
  32. <div> <b>Header:</b> &nbsp;<a href="../headers/tuple/remove.html">&lt;boost/preprocessor/tuple/remove.hpp&gt;</a>
  33. </div>
  34. <h4>Sample Code</h4>
  35. <div>
  36. <pre>#include &lt;<a href="../headers/tuple/remove.html">boost/preprocessor/tuple/remove.hpp</a>&gt;
  37. #define TUPLE (a, b, d)
  38. <a href="tuple_remove.html">BOOST_PP_TUPLE_REMOVE</a>(TUPLE, 2) // expands to (a, b)
  39. </pre></div>
  40. <hr size="1">
  41. <div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i> </div>
  42. <div style="margin-left: 0px;">
  43. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  44. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
  45. or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  46. </div>
  47. </body>
  48. </html>