variadic_elem.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <html>
  2. <head>
  3. <title>BOOST_PP_VARIADIC_ELEM</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_VARIADIC_ELEM</b> variadic macro
  8. extracts an element from <i>variadic data</i>. </div>
  9. <h4>Usage</h4>
  10. <div class="code"> <b>BOOST_PP_VARIADIC_ELEM</b>(<i>i</i>, <i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
  11. </div>
  12. <h4>Arguments</h4>
  13. <dl><dt>i</dt>
  14. <dd> The zero-based index into the <i>variadic data</i> of the element to be
  15. extracted.&nbsp; Valid values range from <i>0</i> to the size of the variadic data - 1.
  16. </dd>
  17. <dt>...<br>
  18. </dt>
  19. <dd> The <i>variadic data</i> from which an element is to be extracted. </dd>
  20. </dl>
  21. <h4>Remarks</h4>
  22. <div>The index <i>i</i> must be less than the size of the <i>variadic data</i>. </div>
  23. <h4>See Also</h4>
  24. <ul>
  25. <li><a href="limit_variadic.html">BOOST_PP_LIMIT_VARIADIC</a></li>
  26. </ul>
  27. <h4>Requirements</h4>
  28. <div> <b>Header:</b> &nbsp;<a href="../headers/variadic/elem.html">&lt;boost/preprocessor/variadic/elem.hpp&gt;</a>
  29. </div>
  30. <h4>Sample Code</h4>
  31. <div>
  32. <pre>#include &lt;<a href="../headers/variadic/elem.html">boost/preprocessor/variadic/elem.hpp</a>&gt;<br><br>#define VAR_DATA a, b, c, d<br><br><a href="variadic_elem.html">BOOST_PP_VARIADIC_ELEM</a>(0, VAR_DATA) // expands to a<br><a href="variadic_elem.html">BOOST_PP_VARIADIC_ELEM</a>(3, VAR_DATA) // expands to d<br></pre>
  33. </div>
  34. <hr size="1">
  35. <div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011,2013</i> </div>
  36. <div style="margin-left: 0px;">
  37. <p><small>Distributed under the Boost Software License, Version 1.0.
  38. (See 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>
  40. </div>
  41. </body>
  42. </html>