seq_for_each_product_r.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <html>
  2. <head>
  3. <title>BOOST_PP_SEQ_FOR_EACH_PRODUCT_R</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_SEQ_FOR_EACH_PRODUCT_R</b> macro repeats a macro for each
  9. cartesian product of several <i>seqs</i>.&nbsp; It reenters <b>BOOST_PP_FOR</b>
  10. with maximum efficiency.
  11. </div>
  12. <h4>
  13. Usage
  14. </h4>
  15. <div class="code">
  16. <b>BOOST_PP_SEQ_FOR_EACH_PRODUCT_R</b>(<i>r</i>, <i>macro</i>, <i>seqs</i>)
  17. </div>
  18. <h4>
  19. Arguments
  20. </h4>
  21. <dl>
  22. <dt>r</dt>
  23. <dd>
  24. The next available <b>BOOST_PP_FOR</b> repetition.
  25. </dd>
  26. <dt>macro</dt>
  27. <dd>
  28. The binary macro of the form <i>macro</i>(<i>r</i>, <i>product</i>).&nbsp; This
  29. macro is expanded by <b>BOOST_PP_FOR_EACH_PRODUCT</b> with each cartesian
  30. product in <i>seqs</i>.&nbsp; It is expanded with the next available <b>BOOST_PP_FOR</b>
  31. repetition and a <i>seq</i> containing a cartesian product.&nbsp;
  32. </dd>
  33. <dt>seqs</dt>
  34. <dd>
  35. A <i>seq</i> of <i>seqs</i> from which cartesian products are obtained.
  36. </dd>
  37. </dl>
  38. <h4>
  39. Remarks
  40. </h4>
  41. <div>
  42. This macro is a repetition construct.&nbsp; If two <i>seqs</i> are (<i>a</i>)(<i>b</i>)(<i>c</i>)
  43. and (<i>x</i>)(<i>y</i>)(<i>z</i>), this macro will produce the following
  44. sequence:
  45. <div>
  46. <i>macro</i>(<i>r</i>, (<i>a</i>)(<i>x</i>)) <i>macro</i>(<i>r</i>, (<i>a</i>)(<i>y</i>))
  47. <i>macro</i>(<i>r</i>, (<i>a</i>)(<i>z</i>)) \
  48. <br>
  49. <i>macro</i>(<i>r</i>, (<i>b</i>)(<i>x</i>)) <i>macro</i>(<i>r</i>, (<i>b</i>)(<i>y</i>))
  50. <i>macro</i>(<i>r</i>, (<i>b</i>)(<i>z</i>)) \
  51. <br>
  52. <i>macro</i>(<i>r</i>, (<i>c</i>)(<i>x</i>)) <i>macro</i>(<i>r</i>, (<i>c</i>)(<i>y</i>))
  53. <i>macro</i>(<i>r</i>, (<i>c</i>)(<i>z</i>))
  54. </div>
  55. </div>
  56. <h4>
  57. See Also
  58. </h4>
  59. <ul>
  60. <li>
  61. <a href="seq_for_each_product.html">BOOST_PP_SEQ_FOR_EACH_PRODUCT</a></li>
  62. </ul>
  63. <h4>
  64. Requirements
  65. </h4>
  66. <div>
  67. <b>Header:</b> &nbsp;<a href="../headers/seq/for_each_product.html">&lt;boost/preprocessor/seq/for_each_product.hpp&gt;</a>
  68. </div>
  69. <hr size="1">
  70. <div style="margin-left: 0px;">
  71. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  72. </br><i>© Copyright Paul Mensonides 2002</i>
  73. </div>
  74. <div style="margin-left: 0px;">
  75. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  76. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  77. copy at <a href=
  78. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  79. </div>
  80. </body>
  81. </html>