Docs updated

[SVN r13169]
This commit is contained in:
Vesa Karvonen
2002-03-10 12:31:37 +00:00
parent 7202e6b56e
commit 03b37c307f
17 changed files with 205 additions and 31 deletions

View File

@ -38,6 +38,21 @@
<p>The length of the sequence is determined by <code>C(R,X)</code>.</p>
<p>For example,</p>
<pre>
#define C(R,X) <a href="comparison_less.htm#BOOST_PP_LESS">BOOST_PP_LESS</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define F(R,X) (<a href="inc.htm#BOOST_PP_INC">BOOST_PP_INC</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define I(R,X) <a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X)
<a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>((0,3),C,F,I)
</pre>
<p>expands to:</p>
<pre>
0 1 2
</pre>
<h3>Legend</h3>
<ul>
<li><b>X</b> is the current state of iteration. The state is usually a tuple.</li>
@ -55,21 +70,6 @@
by the C++ preprocessor.</li>
</ul>
<p>For example,</p>
<pre>
#define C(R,X) <a href="comparison_less.htm#BOOST_PP_LESS">BOOST_PP_LESS</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define F(R,X) (<a href="inc.htm#BOOST_PP_INC">BOOST_PP_INC</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define I(R,X) <a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X)
<a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>((0,3),C,F,I)
</pre>
<p>expands to:</p>
<pre>
0 1 2
</pre>
<h3><a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>() vs <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>()</h3>
<p><a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>() is a generalization of <a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>(). This means that