<tr><td> </td><td><fontsize=-1><em>Repeats I(R,X) and iterates F(R,X) while C(R,X) is true.</em><ahref="#a0">More...</a><em></em></font><br><br></td></tr>
<b>R</b> is the recursion depth and should only be used as a parameter to other macros implemented using <aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>() or for invoking BOOST_PP_FOR#R() directly. For each macro implemented using <aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>(), there is a version of the macro, distinguished by the _R suffix, that accepts an additional recursion depth as the first parameter. This technique is necessary to avoid recursively expanding the same macro again, which is not permitted by the C++ preprocessor.
<p>
<h3><aclass="el"href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() vs <aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>()</h3>
<p>
<aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>() is a generalization of <aclass="el"href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>(). This means that <aclass="el"href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() can be implemented using <aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>(). Unfortunately, <aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>() is slower than <aclass="el"href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>(). In addition, <aclass="el"href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() was introduced earlier, is generally easier to use, and is still quite useful on its own.
<p>
<h3>2D and 3D repetition</h3>
<p>
<aclass="el"href="for_8hpp.html#a0">BOOST_PP_FOR</a>() can be used for multidimensional repetition simply by invoking BOOST_PP_FOR#R() directly. </td>