list_cat_d.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html>
  2. <head>
  3. <title>BOOST_PP_LIST_CAT_D</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_CAT_D</b> macro concatenates all elements in a <i>list</i>.&nbsp;
  9. It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
  10. </div>
  11. <h4>Usage</h4>
  12. <div class="code">
  13. <b>BOOST_PP_LIST_CAT_D</b>(<i>d</i>, <i>list</i>)
  14. </div>
  15. <h4>Arguments</h4>
  16. <dl>
  17. <dt>d</dt>
  18. <dd>
  19. The next available <b>BOOST_PP_WHILE</b> iteration.
  20. </dd>
  21. <dt>list</dt>
  22. <dd>
  23. The <i>list</i> whose elements are to be concatenated.
  24. </dd>
  25. </dl>
  26. <h4>Remarks</h4>
  27. <div>
  28. Elements are concatenated left-to-right starting with index <i>0</i>.
  29. </div>
  30. <h4>See Also</h4>
  31. <ul>
  32. <li><a href="list_cat.html">BOOST_PP_LIST_CAT</a></li>
  33. </ul>
  34. <h4>Requirements</h4>
  35. <div>
  36. <b>Header:</b> &nbsp;<a href="../headers/list/cat.html">&lt;boost/preprocessor/list/cat.hpp&gt;</a>
  37. </div>
  38. <h4>Sample Code</h4>
  39. <div><pre>
  40. #include &lt;<a href="../headers/cat.html">boost/preprocessor/cat.hpp</a>&gt;
  41. #include &lt;<a href="../headers/list/cat.html">boost/preprocessor/list/cat.hpp</a>&gt;
  42. #include &lt;<a href="../headers/list/fold_left.html">boost/preprocessor/list/fold_left.hpp</a>&gt;
  43. #define LISTS \
  44. ((a, (b, <a href="nil.html">BOOST_PP_NIL</a>)), \
  45. ((c, (d, <a href="nil.html">BOOST_PP_NIL</a>)), \
  46. ((e, (f, <a href="nil.html">BOOST_PP_NIL</a>)), \
  47. <a href="nil.html">BOOST_PP_NIL</a>))) \
  48. /**/
  49. #define OP(d, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, <a href="list_cat_d.html">BOOST_PP_LIST_CAT_D</a>(d, x))
  50. <a href="list_fold_left.html">BOOST_PP_LIST_FOLD_LEFT</a>(OP, _, LISTS) // expands to _abcdef
  51. </pre></div>
  52. <hr size="1">
  53. <div style="margin-left: 0px;">
  54. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  55. </br><i>© Copyright Paul Mensonides 2002</i>
  56. </div>
  57. <div style="margin-left: 0px;">
  58. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  59. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  60. copy at <a href=
  61. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  62. </div>
  63. </body>
  64. </html>