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

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>