mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-07-29 11:47:14 +02:00
pre
[SVN r13974]
This commit is contained in:
@ -31,11 +31,11 @@
|
||||
<p>In other words, expands to the sequence:</p>
|
||||
|
||||
<pre>
|
||||
MACRO(R,STATE)
|
||||
MACRO(R,OP(R,STATE))
|
||||
MACRO(R,OP(R,OP(R,STATE)))
|
||||
...
|
||||
MACRO(R,OP(R,OP(...OP(R,STATE)...)))
|
||||
MACRO(R,STATE)
|
||||
MACRO(R,OP(R,STATE))
|
||||
MACRO(R,OP(R,OP(R,STATE)))
|
||||
...
|
||||
MACRO(R,OP(R,OP(...OP(R,STATE)...)))
|
||||
</pre>
|
||||
|
||||
<p>The length of the sequence is determined by <code>PRED(R,STATE)</code>.</p>
|
||||
@ -43,16 +43,16 @@
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define PRED(R,STATE) <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,STATE),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,STATE))
|
||||
#define OP(R,STATE) (<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,STATE)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,STATE))
|
||||
#define MACRO(R,STATE) <a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,STATE)
|
||||
<a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>((0,3),PRED,OP,MACRO)
|
||||
#define PRED(R,STATE) <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,STATE),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,STATE))
|
||||
#define OP(R,STATE) (<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,STATE)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,STATE))
|
||||
#define MACRO(R,STATE) <a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,STATE)
|
||||
<a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>((0,3),PRED,OP,MACRO)
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
0 1 2
|
||||
0 1 2
|
||||
</pre>
|
||||
|
||||
<h3>Legend</h3>
|
||||
|
Reference in New Issue
Block a user