mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-07-20 07:52:06 +02:00
Longer macro parameter names
[SVN r13459]
This commit is contained in:
@ -26,24 +26,24 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<h2><a name="BOOST_PP_LIST_FOLD_LEFT">#define BOOST_PP_LIST_FOLD_LEFT</a>(F,P,L)</h2>
|
||||
<p>Iterates <code>F(D,P,X)</code> for each element <code>X</code> of the
|
||||
list <code>L</code> (from the left or the start of the list).</p>
|
||||
<h2><a name="BOOST_PP_LIST_FOLD_LEFT">#define BOOST_PP_LIST_FOLD_LEFT</a>(OP,STATE,LIST)</h2>
|
||||
<p>Iterates <code>OP(D,STATE,X)</code> for each element <code>X</code> of the
|
||||
list <code>LIST</code> (from the left or the start of the list).</p>
|
||||
|
||||
<p>In other words, expands to:</p>
|
||||
|
||||
<pre>
|
||||
F
|
||||
OP
|
||||
( D
|
||||
, ... F(D, F(D,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,0)), <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,1)) ...
|
||||
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(L))
|
||||
, ... OP(D, OP(D,STATE,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,0)), <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,1)) ...
|
||||
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(LIST))
|
||||
)
|
||||
</pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(D,P,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,X)
|
||||
#define TEST(D,STATE,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(STATE,X)
|
||||
<a href="list_fold_left.htm#BOOST_PP_LIST_FOLD_LEFT">BOOST_PP_LIST_FOLD_LEFT</a>(TEST,_,<a href="tuple_to_list.htm#BOOST_PP_TUPLE_TO_LIST">BOOST_PP_TUPLE_TO_LIST</a>(3,(A,B,C)))
|
||||
</pre>
|
||||
|
||||
@ -76,7 +76,7 @@ list <code>L</code> (from the left or the start of the list).</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_D">#define BOOST_PP_LIST_FOLD_LEFT_D</a>(D,F,P,L)</h2>
|
||||
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_D">#define BOOST_PP_LIST_FOLD_LEFT_D</a>(D,OP,STATE,LIST)</h2>
|
||||
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
|
||||
<hr>
|
||||
|
||||
|
Reference in New Issue
Block a user