mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-07-12 03:56:34 +02:00
Docs update
[SVN r13144]
This commit is contained in:
@ -44,6 +44,21 @@
|
||||
by the C++ preprocessor.</li>
|
||||
</ul>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define C(R,X) BOOST_PP_LESS(BOOST_PP_TUPLE_ELEM(2,0,X),BOOST_PP_TUPLE_ELEM(2,1,X))
|
||||
#define F(R,X) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2,0,X)),BOOST_PP_TUPLE_ELEM(2,1,X))
|
||||
#define I(R,X) BOOST_PP_TUPLE_ELEM(2,0,X)
|
||||
BOOST_PP_FOR((0,3),C,F,I)
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
0 1 2
|
||||
</pre>
|
||||
|
||||
<h3>BOOST_PP_REPEAT() vs BOOST_PP_FOR()</h3>
|
||||
|
||||
<p>BOOST_PP_FOR() is a generalization of BOOST_PP_REPEAT(). This means that
|
||||
|
Reference in New Issue
Block a user