forked from boostorg/preprocessor
Docs updated
[SVN r13169]
This commit is contained in:
@ -33,7 +33,7 @@ list <code>L</code> (from the left or the start of the list).</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(D,P,X) BOOST_PP_CAT(P,X)
|
||||
BOOST_PP_FOLD_LEFT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
BOOST_PP_LIST_FOLD_LEFT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
@ -36,6 +36,19 @@ list <code>L</code> (from the right or the end of the list).</p>
|
||||
)
|
||||
</pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(D,X,P) BOOST_PP_CAT(P,X)
|
||||
BOOST_PP_LIST_FOLD_RIGHT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
_CBA
|
||||
</pre>
|
||||
|
||||
<h3>Uses</h3>
|
||||
<ul>
|
||||
<li>BOOST_PP_WHILE() (see for explanation of the D parameter)</li>
|
||||
|
@ -27,6 +27,19 @@ BOOST_PP_LIST_SIZE(L)[.</p>
|
||||
F(R,P,BOOST_PP_LIST_AT(L,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L))))
|
||||
</pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(R,P,X) BOOST_PP_CAT(P,X)();
|
||||
BOOST_PP_LIST_FOR_EACH(TEST,prefix_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
prefix_A(); prefix_B(); prefix_C();
|
||||
</pre>
|
||||
|
||||
<h3>Example</h3>
|
||||
<ul>
|
||||
<li><a href="../../example/catch_builtin.cpp">catch_builtin.cpp</a></li>
|
||||
|
@ -29,6 +29,19 @@ BOOST_PP_LIST_SIZE(L)[.</p>
|
||||
F(R,P,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L)),BOOST_PP_LIST_AT(L,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L))))
|
||||
</pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(R,P,I,X) BOOST_PP_CAT(P,X)(I);
|
||||
BOOST_PP_LIST_FOR_EACH_I(TEST,prefix_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
prefix_A(0); prefix_B(1); prefix_C(2);
|
||||
</pre>
|
||||
|
||||
<h3>Uses</h3>
|
||||
<ul>
|
||||
<li>BOOST_PP_FOR() (see for explanation of the R parameter)</li>
|
||||
|
@ -25,6 +25,25 @@ cartesian product of the lists of the <code>N</code>-tuple <code>T_OF_L</code>.<
|
||||
<p>This macro is useful for generating code to avoid combinatorial
|
||||
explosion.</p>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TEST(R,X) X
|
||||
BOOST_PP_LIST_FOR_EACH_PRODUCT
|
||||
( TEST
|
||||
, 2
|
||||
, ( BOOST_PP_TUPLE_TO_LIST(3,(A,B,C))
|
||||
, BOOST_PP_TUPLE_TO_LIST(2,(1,2))
|
||||
)
|
||||
)
|
||||
</pre>
|
||||
|
||||
<p>expands to:</p>
|
||||
|
||||
<pre>
|
||||
(A,1) (A,2) (B,1) (B,2) (C,1) (C,2)
|
||||
</pre>
|
||||
|
||||
<h3>Example</h3>
|
||||
<ul>
|
||||
<li><a href="../../example/is_integral.cpp">is_integral.cpp</a></li>
|
||||
|
Reference in New Issue
Block a user