list_enum.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <html>
  2. <head>
  3. <title>BOOST_PP_LIST_ENUM</title>
  4. <link rel="stylesheet" type="text/css" href="../styles.css">
  5. </head>
  6. <body>
  7. <div style="margin-left: 0px;">
  8. The <b>BOOST_PP_LIST_ENUM</b> macro converts a <i>list</i> to a comma-separated list.
  9. </div>
  10. <h4>Usage</h4>
  11. <div class="code">
  12. <b>BOOST_PP_LIST_ENUM</b>(<i>list</i>)
  13. </div>
  14. <h4>Arguments</h4>
  15. <dl>
  16. <dt>list</dt>
  17. <dd>
  18. The <i>list</i> to be converted.
  19. </dd>
  20. </dl>
  21. <h4>Remarks</h4>
  22. <div>
  23. If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
  24. this macro will produce:
  25. <div>
  26. <i>a</i>, <i>b</i>, <i>c</i>
  27. </div>
  28. </div>
  29. <div>
  30. Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.&nbsp;
  31. There is no longer any such restriction.&nbsp;
  32. It is more efficient, however, to use <b>BOOST_PP_LIST_ENUM_R</b> in such a situation.
  33. </div>
  34. <h4>See Also</h4>
  35. <ul>
  36. <li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
  37. </ul>
  38. <h4>Requirements</h4>
  39. <div>
  40. <b>Header:</b> &nbsp;<a href="../headers/list/enum.html">&lt;boost/preprocessor/list/enum.hpp&gt;</a>
  41. </div>
  42. <h4>Sample Code</h4>
  43. <div><pre>
  44. #include &lt;<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>&gt;
  45. #define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))
  46. <a href="list_enum.html">BOOST_PP_LIST_ENUM</a>(LIST) // expands to w, x, y, z
  47. </pre></div>
  48. <hr size="1">
  49. <div style="margin-left: 0px;">
  50. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  51. </br><i>© Copyright Paul Mensonides 2002</i>
  52. </div>
  53. <div style="margin-left: 0px;">
  54. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  55. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  56. copy at <a href=
  57. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  58. </div>
  59. </body>
  60. </html>