Longer macro parameter names

[SVN r13459]
This commit is contained in:
Vesa Karvonen
2002-04-12 11:26:25 +00:00
parent 3468956bc9
commit 06ff87a86c
96 changed files with 368 additions and 322 deletions

View File

@ -26,9 +26,11 @@
<hr>
<h2><a name="BOOST_PP_ASSERT_MSG">#define BOOST_PP_ASSERT_MSG</a>(C,MSG)</h2>
<p>Expands to nothing if <code>C != 0</code> and to <code>MSG</code> if
<code>C == 0</code>.</p>
<h2><a name="BOOST_PP_ASSERT_MSG">#define BOOST_PP_ASSERT_MSG</a>(COND,MSG)</h2>
<p>Expands to nothing if <code>COND != 0</code> and to <code>MSG</code> if
<code>COND == 0</code>.</p>
<p><code>COND</code> must expand to an integer literal.</p>
<p>For example, <code><a href="assert_msg.htm#BOOST_PP_ASSERT_MSG">BOOST_PP_ASSERT_MSG</a>(1,A BUG!)</code> expands to <code>A BUG!</code>.</p>

View File

@ -26,9 +26,11 @@
<hr>
<h2><a name="BOOST_PP_COMMA_IF">#define BOOST_PP_COMMA_IF</a>(C)</h2>
<p>Expands to a comma if <code>C != 0</code> and nothing if
<code>C == 0</code>.</p>
<h2><a name="BOOST_PP_COMMA_IF">#define BOOST_PP_COMMA_IF</a>(COND)</h2>
<p>Expands to a comma if <code>COND != 0</code> and nothing if
<code>COND == 0</code>.</p>
<p><code>COND</code> must expand to an integer literal.</p>
<p>For example, <code><a href="comma_if.htm#BOOST_PP_COMMA_IF">BOOST_PP_COMMA_IF</a>(0)</code> expands to nothing.</p>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X == Y</code> and <code>0</code>
otherwise.</p>
<p>Both <code>X</code> and <code>Y</code> must expand to integer literals.</p>
<p>For example, <code><a href="comparison_equal.htm#BOOST_PP_EQUAL">BOOST_PP_EQUAL</a>(4,4)</code> expands to <code>1</code>.</p>
<h3>Uses</h3>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X &gt; Y</code> and <code>0</code>
otherwise.</p>
<p>Both <code>X</code> and <code>Y</code> must expand to integer literals.</p>
<p>For example, <code><a href="comparison_greater.htm#BOOST_PP_GREATER">BOOST_PP_GREATER</a>(4,3)</code> expands to <code>1</code>.</p>
<h3>Uses</h3>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X &gt;= Y</code> and <code>0</code>
otherwise.</p>
<p>Both <code>X</code> and <code>Y</code> must expand to integer literals.</p>
<p>For example, <code><a href="comparison_greater_equal.htm#BOOST_PP_GREATER_EQUAL">BOOST_PP_GREATER_EQUAL</a>(1,3)</code> expands to <code>0</code>.</p>
<h3>Uses</h3>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X &lt; Y</code> and <code>0</code>
otherwise.</p>
<p>Both <code>X</code> and <code>Y</code> must expand to integer literals.</p>
<p>For example, <code><a href="comparison_less.htm#BOOST_PP_LESS">BOOST_PP_LESS</a>(2,6)</code> expands to <code>1</code>.</p>
<h3>Uses</h3>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X &lt;= Y</code> and <code>0</code>
otherwise.</p>
<p><code>X</code> must expand to an integer literal.</p>
<p>For example, <code><a href="comparison_less_equal.htm#BOOST_PP_LESS_EQUAL">BOOST_PP_LESS_EQUAL</a>(7,5)</code> expands to <code>0</code>.</p>
<h3>Uses</h3>

View File

@ -30,6 +30,8 @@
<p>Expands to <code>1</code> if <code>X != Y</code> and <code>0</code>
otherwise.</p>
<p>Both <code>X</code> and <code>Y</code> must expand to integer literals.</p>
<p>For example, <code><a href="comparison_not_equal.htm#BOOST_PP_NOT_EQUAL">BOOST_PP_NOT_EQUAL</a>(4,4)</code> expands to <code>0</code>.</p>
<h3>Uses</h3>

View File

@ -26,20 +26,20 @@
<hr>
<h2><a name="BOOST_PP_ENUM">#define BOOST_PP_ENUM</a>(N,F,P)</h2>
<h2><a name="BOOST_PP_ENUM">#define BOOST_PP_ENUM</a>(COUNT,MACRO,DATA)</h2>
<p>Generates a comma separated list.</p>
<p>In other words, expands to the sequence:</p>
<pre>
F(0,P), F(1,P), ..., F(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N),P)
MACRO(0,DATA), MACRO(1,DATA), ..., MACRO(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT),DATA)
</pre>
<p>For example,</p>
<pre>
#define TYPED_PARAM(I,P)\
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,P),I) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,P),I)
#define TYPED_PARAM(INDEX,DATA)\
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,DATA),INDEX) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,DATA),INDEX)
<a href="enum.htm#BOOST_PP_ENUM">BOOST_PP_ENUM</a>(3,TYPED_PARAM,(X,x))
</pre>

View File

@ -26,13 +26,13 @@
<hr>
<h2><a name="BOOST_PP_ENUM_PARAMS">#define BOOST_PP_ENUM_PARAMS</a>(N,P)</h2>
<h2><a name="BOOST_PP_ENUM_PARAMS">#define BOOST_PP_ENUM_PARAMS</a>(COUNT,PARAM)</h2>
<p>Generates a comma separated list of parameters.</p>
<p>In other words, expands to the sequence:</p>
<pre>
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,0), <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,1), ..., <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N))
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,0), <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,1), ..., <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT))
</pre>
<p>For example,</p>

View File

@ -26,13 +26,16 @@
<hr>
<h2><a name="BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT">#define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a>(N,P,D)</h2>
<h2><a name="BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT">#define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a>(COUNT,PARAM,DEFAULT)</h2>
<p>Generates a comma separated list of parameters with a default.</p>
<p>In other words, expands to the sequence:</p>
<pre>
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,0) = D, <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,1) = D, ..., <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N)) = D
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,0) = DEFAULT,
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,1) = DEFAULT,
...,
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT)) = DEFAULT
</pre>
<p>For example,</p>

View File

@ -26,16 +26,16 @@
<hr>
<h2><a name="BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS">#define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a>(N,P,D)</h2>
<h2><a name="BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS">#define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a>(COUNT,PARAM,DEFAULT)</h2>
<p>Generates a comma separated list of parameters with defaults.</p>
<p>In other words, expands to the sequence:</p>
<pre>
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,0) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(D,0),
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,1) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(D,1),
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,0) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(DEFAULT,0),
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,1) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(DEFAULT,1),
...,
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N)) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(D,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N))
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT)) = <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(DEFAULT,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT))
</pre>
<p>For example,</p>

View File

@ -26,20 +26,20 @@
<hr>
<h2><a name="BOOST_PP_ENUM_SHIFTED">#define BOOST_PP_ENUM_SHIFTED</a>(N,F,P)</h2>
<h2><a name="BOOST_PP_ENUM_SHIFTED">#define BOOST_PP_ENUM_SHIFTED</a>(COUNT,MACRO,DATA)</h2>
<p>Generates a comma separated shifted list.</p>
<p>In other words, expands to the sequence:</p>
<pre>
F(1,P), F(2,P), ..., F(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N),P)
MACRO(1,DATA), MACRO(2,DATA), ..., MACRO(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT),DATA)
</pre>
<p>For example,</p>
<pre>
#define TYPED_PARAM(I,P)\
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,P),I) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,P),I)
#define TYPED_PARAM(INDEX,DATA)\
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,DATA),INDEX) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,DATA),INDEX)
<a href="enum_shifted.htm#BOOST_PP_ENUM_SHIFTED">BOOST_PP_ENUM_SHIFTED</a>(3,TYPED_PARAM,(X,x))
</pre>

View File

@ -26,13 +26,13 @@
<hr>
<h2><a name="BOOST_PP_ENUM_SHIFTED_PARAMS">#define BOOST_PP_ENUM_SHIFTED_PARAMS</a>(N,P)</h2>
<h2><a name="BOOST_PP_ENUM_SHIFTED_PARAMS">#define BOOST_PP_ENUM_SHIFTED_PARAMS</a>(COUNT,PARAM)</h2>
<p>Generates a comma separated list of shifted actual parameters.</p>
<p>In other words, expands to the sequence:</p>
<pre>
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,1), <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,2), ..., <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N))
<a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,1), <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,2), ..., <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(PARAM,<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT))
</pre>
<p>For example,</p>

View File

@ -26,8 +26,10 @@
<hr>
<h2><a name="BOOST_PP_EXPR_IF">#define BOOST_PP_EXPR_IF</a>(C,E)</h2>
<p>Expands to <code>E</code> if <code>C != 0</code> and to nothing if <code>C == 0</code>.</p>
<h2><a name="BOOST_PP_EXPR_IF">#define BOOST_PP_EXPR_IF</a>(COND,EXPR)</h2>
<p>Expands to <code>EXPR</code> if <code>COND != 0</code> and to nothing if <code>COND == 0</code>.</p>
<p><code>COND</code> must expand to an integer literal.</p>
<p>For example, <code><a href="expr_if.htm#BOOST_PP_EXPR_IF">BOOST_PP_EXPR_IF</a>(1,^)</code> expands to <code>^</code>.</p>

View File

@ -26,25 +26,25 @@
<hr>
<h2><a name="BOOST_PP_FOR">#define BOOST_PP_FOR</a>(X,C,F,I)</h2>
<p>Repeats <code>I(R,X)</code> and iterates <code>F(R,X)</code> while
<code>C(R,X)</code> is true.</p>
<h2><a name="BOOST_PP_FOR">#define BOOST_PP_FOR</a>(STATE,PRED,OP,MACRO)</h2>
<p>Repeats <code>MACRO(R,STATE)</code> and iterates <code>OP(R,STATE)</code> while
<code>PRED(R,STATE)</code> is true.</p>
<p>In other words, expands to the sequence:</p>
<pre>
I(R,X) I(R,F(R,X)) I(R,F(R,F(R,X))) ... I(R,F(R,F(...F(R,X)...)))
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>C(R,X)</code>.</p>
<p>The length of the sequence is determined by <code>PRED(R,STATE)</code>.</p>
<p>For example,</p>
<pre>
#define C(R,X) <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,X),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define F(R,X) (<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,X)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define I(R,X) <a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X)
<a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>((0,3),C,F,I)
#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>
@ -55,19 +55,19 @@
<h3>Legend</h3>
<ul>
<li><b>X</b> is the current state of iteration. The state is usually a tuple.</li>
<li><b>C</b> is the condition for iteration. It must expand to a decimal
<li><b>STATE</b> is the current state of iteration. The state is usually a tuple.</li>
<li><b>PRED</b> is the condition for iteration. It must expand to a decimal
integer literal.</li>
<li><b>F</b> is the iterated macro. Note that if the state is a tuple, then
F(R,X) usually expands to a tuple of the same number of elements.</li>
<li><b>I</b> is the state instantiation macro.</li>
<li><b>OP</b> is the iterated macro. Note that if the state is a tuple, then
OP(R,STATE) usually expands to a tuple of the same number of elements.</li>
<li><b>MACRO</b> is the state instantiation macro.</li>
<li><b>R</b> is the recursion depth and should only be used as a parameter to
other macros using <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>() or for invoking <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>##R()
directly. For each macro using <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>(), there is a version of the
macro, distinguished by the R suffix, that accepts an additional
recursion depth as the first parameter. This technique is necessary to
avoid recursively expanding the same macro again, which is not permitted
by the C++ preprocessor.</li>
directly. For each macro using <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>(), e.g. <a href="list_for_each.htm#BOOST_PP_LIST_FOR_EACH">BOOST_PP_LIST_FOR_EACH</a>(),
there is a version of the macro, e.g. <a href="list_for_each.htm#BOOST_PP_LIST_FOR_EACH_R">BOOST_PP_LIST_FOR_EACH_R</a>(), distinguished
by the R suffix, that accepts an additional recursion depth as the first
parameter. This technique is necessary to avoid recursively expanding the same
macro again, which is not permitted by the C++ preprocessor.</li>
</ul>
<h3><a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>() vs <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>()</h3>

View File

@ -26,9 +26,11 @@
<hr>
<h2><a name="BOOST_PP_IF">#define BOOST_PP_IF</a>(C,T,E)</h2>
<p>Expands to <code>T</code> if <code>C != 0</code> and <code>E</code> if
<code>C == 0</code>.</p>
<h2><a name="BOOST_PP_IF">#define BOOST_PP_IF</a>(COND,THEN,ELSE)</h2>
<p>Expands to <code>THEN</code> if <code>COND != 0</code> and <code>ELSE</code> if
<code>COND == 0</code>.</p>
<p><code>COND</code> must expand to an integer literal.</p>
<p>For example, <code><a href="if.htm#BOOST_PP_IF">BOOST_PP_IF</a>(0,1,2)</code> expands to <code>2</code>.</p>

View File

@ -55,7 +55,7 @@ and <a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a> family).</p>
<hr>
<h2><a name="BOOST_PP_LIMIT_TUPLE">#define BOOST_PP_LIMIT_TUPLE</a></h2>
<p>Expands to the maximum tuple length supported by the library.</p>
<p>Expands to the maximum tuple size supported by the library.</p>
<hr>
<h2><a name="BOOST_PREPROCESSOR_LIMIT_DIM">#define BOOST_PREPROCESSOR_LIMIT_DIM</a></h2>

View File

@ -34,7 +34,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_CONS">#define BOOST_PP_LIST_CONS</a>(H,T)</h2>
<h2><a name="BOOST_PP_LIST_CONS">#define BOOST_PP_LIST_CONS</a>(FIRST,REST)</h2>
<p>List constructor.</p>
<p>Lists are build using list constructors <a href="list_adt.htm#BOOST_PP_LIST_NIL">BOOST_PP_LIST_NIL</a> and
@ -79,15 +79,15 @@ and <a href="list_fold_right_2nd.htm#BOOST_PP_LIST_FOLD_RIGHT_2ND">BOOST_PP_LIST
<p>List nil constructor.</p>
<hr>
<h2><a name="BOOST_PP_LIST_IS_CONS">#define BOOST_PP_LIST_IS_CONS</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_IS_CONS">#define BOOST_PP_LIST_IS_CONS</a>(LIST)</h2>
<p>Expands to 1 if the list is not nil and 0 otherwise.</p>
<hr>
<h2><a name="BOOST_PP_LIST_IS_NIL">#define BOOST_PP_LIST_IS_NIL</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_IS_NIL">#define BOOST_PP_LIST_IS_NIL</a>(LIST)</h2>
<p>Expands to 1 if the list is nil and 0 otherwise.</p>
<hr>
<h2><a name="BOOST_PP_LIST_FIRST">#define BOOST_PP_LIST_FIRST</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_FIRST">#define BOOST_PP_LIST_FIRST</a>(LIST)</h2>
<p>Expands to the first element of the list. The list must not be nil.</p>
<p>For example,</p>
@ -100,7 +100,7 @@ and <a href="list_fold_right_2nd.htm#BOOST_PP_LIST_FOLD_RIGHT_2ND">BOOST_PP_LIST
<hr>
<h2><a name="BOOST_PP_LIST_REST">#define BOOST_PP_LIST_REST</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_REST">#define BOOST_PP_LIST_REST</a>(LIST)</h2>
<p>Expands to a list of all but the first element of the list.</p>
<p>The list must not be nil.</p>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_APPEND">#define BOOST_PP_LIST_APPEND</a>(L,R)</h2>
<h2><a name="BOOST_PP_LIST_APPEND">#define BOOST_PP_LIST_APPEND</a>(LIST_1ST,LIST_2ND)</h2>
<p>Catenates two lists together.</p>
<p>For example,</p>
@ -56,7 +56,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_APPEND_D">#define BOOST_PP_LIST_APPEND_D</a>(D,L,R)</h2>
<h2><a name="BOOST_PP_LIST_APPEND_D">#define BOOST_PP_LIST_APPEND_D</a>(D,LIST_1ST,LIST_2ND)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,8 +26,8 @@
<hr>
<h2><a name="BOOST_PP_LIST_AT">#define BOOST_PP_LIST_AT</a>(L,I)</h2>
<p>Expands to the <code>I</code>:th element of the list <code>L</code>. The
<h2><a name="BOOST_PP_LIST_AT">#define BOOST_PP_LIST_AT</a>(LIST,INDEX)</h2>
<p>Expands to the <code>INDEX</code>:th element of the list <code>LIST</code>. The
first element is at index <code>0</code>.</p>
<p>For example,</p>
@ -50,7 +50,7 @@ first element is at index <code>0</code>.</p>
<hr>
<h2><a name="BOOST_PP_LIST_AT_D">#define BOOST_PP_LIST_AT_D</a>(D,L,I)</h2>
<h2><a name="BOOST_PP_LIST_AT_D">#define BOOST_PP_LIST_AT_D</a>(D,LIST,INDEX)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_CAT">#define BOOST_PP_LIST_CAT</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_CAT">#define BOOST_PP_LIST_CAT</a>(LIST)</h2>
<p>Catenates all elements of the list.</p>
<p>For example,</p>
@ -53,7 +53,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_CAT_D">#define BOOST_PP_LIST_CAT_D</a>(D,L)</h2>
<h2><a name="BOOST_PP_LIST_CAT_D">#define BOOST_PP_LIST_CAT_D</a>(D,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_ENUM">#define BOOST_PP_LIST_ENUM</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_ENUM">#define BOOST_PP_LIST_ENUM</a>(LIST)</h2>
<p>Converts the list to a comma separated list.</p>
<p>For example,</p>
@ -48,7 +48,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_ENUM_R">#define BOOST_PP_LIST_ENUM_R</a>(R,L)</h2>
<h2><a name="BOOST_PP_LIST_ENUM_R">#define BOOST_PP_LIST_ENUM_R</a>(R,LIST)</h2>
<p>Can be used inside <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>().</p>
<hr>

View File

@ -26,9 +26,9 @@
<hr>
<h2><a name="BOOST_PP_LIST_FILTER">#define BOOST_PP_LIST_FILTER</a>(F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FILTER">#define BOOST_PP_LIST_FILTER</a>(PRED,DATA,LIST)</h2>
<p>Expands to a list containing all the elements <code>X</code> of the list
for which <code>F(D,P,X)</code> is true.</p>
for which <code>PRED(D,DATA,X)</code> is true.</p>
<p>For example,</p>
@ -55,7 +55,7 @@ for which <code>F(D,P,X)</code> is true.</p>
<hr>
<h2><a name="BOOST_PP_LIST_FILTER_D">#define BOOST_PP_LIST_FILTER_D</a>(D,F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FILTER_D">#define BOOST_PP_LIST_FILTER_D</a>(D,PRED,DATA,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,9 +26,9 @@
<hr>
<h2><a name="BOOST_PP_LIST_FIRST_N">#define BOOST_PP_LIST_FIRST_N</a>(N,L)</h2>
<p>Expands to a list of the first <code>N</code> elements of the list
<code>L</code>.</p>
<h2><a name="BOOST_PP_LIST_FIRST_N">#define BOOST_PP_LIST_FIRST_N</a>(COUNT,LIST)</h2>
<p>Expands to a list of the first <code>COUNT</code> elements of the list
<code>LIST</code>.</p>
<p>For example,</p>
@ -59,7 +59,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_FIRST_N_D">#define BOOST_PP_LIST_FIRST_N_D</a>(D,N,L)</h2>
<h2><a name="BOOST_PP_LIST_FIRST_N_D">#define BOOST_PP_LIST_FIRST_N_D</a>(D,COUNT,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

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

View File

@ -26,11 +26,11 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_2ND">#define BOOST_PP_LIST_FOLD_LEFT_2ND</a>(F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_2ND">#define BOOST_PP_LIST_FOLD_LEFT_2ND</a>(OP,STATE,LIST)</h2>
<p>Same as <a href="list_fold_left.htm#BOOST_PP_LIST_FOLD_LEFT">BOOST_PP_LIST_FOLD_LEFT</a>(), but implemented independently.</p>
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_2ND_D">#define BOOST_PP_LIST_FOLD_LEFT_2ND_D</a>(D,F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FOLD_LEFT_2ND_D">#define BOOST_PP_LIST_FOLD_LEFT_2ND_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>

View File

@ -26,23 +26,23 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT">#define BOOST_PP_LIST_FOLD_RIGHT</a>(F,L,P)</h2>
<p>Iterates <code>F(D,X,P)</code> for each element <code>X</code> of the
list <code>L</code> (from the right or the end of the list).</p>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT">#define BOOST_PP_LIST_FOLD_RIGHT</a>(OP,LIST,STATE)</h2>
<p>Iterates <code>OP(D,X,STATE)</code> for each element <code>X</code> of the
list <code>LIST</code> (from the right or the end of the list).</p>
<p>In other words, expands to:</p>
<pre>
F
OP
( D
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,0)
, ... F
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,0)
, ... OP
( D
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,<a href="arithmetic_sub.htm#BOOST_PP_SUB">BOOST_PP_SUB</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(L),2))
, F
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,<a href="arithmetic_sub.htm#BOOST_PP_SUB">BOOST_PP_SUB</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(LIST),2))
, OP
( D
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,<a href="arithmetic_sub.htm#BOOST_PP_SUB">BOOST_PP_SUB</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(L),1))
, P
, <a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,<a href="arithmetic_sub.htm#BOOST_PP_SUB">BOOST_PP_SUB</a>(<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(LIST),1))
, STATE
)
) ...
)
@ -51,7 +51,7 @@ list <code>L</code> (from the right or the end of the list).</p>
<p>For example,</p>
<pre>
#define TEST(D,X,P) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,X)
#define TEST(D,X,STATE) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(STATE,X)
<a href="list_fold_right.htm#BOOST_PP_LIST_FOLD_RIGHT">BOOST_PP_LIST_FOLD_RIGHT</a>(TEST,_,<a href="tuple_to_list.htm#BOOST_PP_TUPLE_TO_LIST">BOOST_PP_TUPLE_TO_LIST</a>(3,(A,B,C)))
</pre>
@ -74,7 +74,7 @@ list <code>L</code> (from the right or the end of the list).</p>
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_D">#define BOOST_PP_LIST_FOLD_RIGHT_D</a>(D,F,L,P)</h2>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_D">#define BOOST_PP_LIST_FOLD_RIGHT_D</a>(D,OP,LIST,STATE)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,11 +26,11 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_2ND">#define BOOST_PP_LIST_FOLD_RIGHT_2ND</a>(F,L,P)</h2>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_2ND">#define BOOST_PP_LIST_FOLD_RIGHT_2ND</a>(OP,LIST,STATE)</h2>
<p>Same as <a href="list_fold_right.htm#BOOST_PP_LIST_FOLD_RIGHT">BOOST_PP_LIST_FOLD_RIGHT</a>(), but implemented independently.</p>
<hr>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_2ND_D">#define BOOST_PP_LIST_FOLD_RIGHT_2ND_D</a>(D,F,L,P)</h2>
<h2><a name="BOOST_PP_LIST_FOLD_RIGHT_2ND_D">#define BOOST_PP_LIST_FOLD_RIGHT_2ND_D</a>(D,OP,LIST,STATE)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,23 +26,23 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH">#define BOOST_PP_LIST_FOR_EACH</a>(F,P,L)</h2>
<p>Repeats <code>F(R,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,I))</code> for each I = [0,
<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(L)[.</p>
<h2><a name="BOOST_PP_LIST_FOR_EACH">#define BOOST_PP_LIST_FOR_EACH</a>(MACRO,DATA,LIST)</h2>
<p>Repeats <code>MACRO(R,DATA,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,INDEX))</code> for each INDEX = [0,
<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(LIST)[.</p>
<p>In other words, expands to the sequence:</p>
<pre>
F(R,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,0))
F(R,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,1))
MACRO(R,DATA,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,0))
MACRO(R,DATA,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,1))
...
F(R,P,<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))))
MACRO(R,DATA,<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(R,P,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,X)();
#define TEST(R,DATA,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(DATA,X)();
<a href="list_for_each.htm#BOOST_PP_LIST_FOR_EACH">BOOST_PP_LIST_FOR_EACH</a>(TEST,prefix_,<a href="tuple_to_list.htm#BOOST_PP_TUPLE_TO_LIST">BOOST_PP_TUPLE_TO_LIST</a>(3,(A,B,C)))
</pre>
@ -70,7 +70,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH_R">#define BOOST_PP_LIST_FOR_EACH_R</a>(R,F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FOR_EACH_R">#define BOOST_PP_LIST_FOR_EACH_R</a>(R,MACRO,DATA,LIST)</h2>
<p>Can be used inside <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>().</p>
<hr>

View File

@ -26,23 +26,23 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH_I">#define BOOST_PP_LIST_FOR_EACH_I</a>(F,P,L)</h2>
<p>Repeats <code>F(R,P,I,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,I))</code> for each I = [0,
<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(L)[.</p>
<h2><a name="BOOST_PP_LIST_FOR_EACH_I">#define BOOST_PP_LIST_FOR_EACH_I</a>(MACRO,DATA,LIST)</h2>
<p>Repeats <code>MACRO(R,DATA,INDEX,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,INDEX))</code> for each INDEX = [0,
<a href="list_size.htm#BOOST_PP_LIST_SIZE">BOOST_PP_LIST_SIZE</a>(LIST)[.</p>
<p>In other words, expands to the sequence:</p>
<pre>
F(R,P,0,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,0))
F(R,P,1,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,1))
MACRO(R,DATA,0,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,0))
MACRO(R,DATA,1,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,1))
...
F(R,P,<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)),<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))))
MACRO(R,DATA,<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)),<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(R,P,I,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(P,X)(I);
#define TEST(R,DATA,INDEX,X) <a href="cat.htm#BOOST_PP_CAT">BOOST_PP_CAT</a>(DATA,X)(INDEX);
<a href="list_for_each_i.htm#BOOST_PP_LIST_FOR_EACH_I">BOOST_PP_LIST_FOR_EACH_I</a>(TEST,prefix_,<a href="tuple_to_list.htm#BOOST_PP_TUPLE_TO_LIST">BOOST_PP_TUPLE_TO_LIST</a>(3,(A,B,C)))
</pre>
@ -59,7 +59,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH_I_R">#define BOOST_PP_LIST_FOR_EACH_I_R</a>(R,F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_FOR_EACH_I_R">#define BOOST_PP_LIST_FOR_EACH_I_R</a>(R,MACRO,DATA,LIST)</h2>
<p>Can be used inside <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>().</p>
<hr>

View File

@ -26,9 +26,9 @@
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH_PRODUCT">#define BOOST_PP_LIST_FOR_EACH_PRODUCT</a>(F,N,T_OF_L)</h2>
<p>Repeats <code>F(R,X)</code> for each element <code>X</code> of the
cartesian product of the lists of the <code>N</code>-tuple <code>T_OF_L</code>.</p>
<h2><a name="BOOST_PP_LIST_FOR_EACH_PRODUCT">#define BOOST_PP_LIST_FOR_EACH_PRODUCT</a>(MACRO,SIZE_OF_TUPLE,TUPLE_OF_LISTS)</h2>
<p>Repeats <code>MACRO(R,X)</code> for each element <code>X</code> of the
cartesian product of the lists of the <code>SIZE_OF_TUPLE</code>-tuple <code>TUPLE_OF_LISTS</code>.</p>
<p>This macro is useful for generating code to avoid combinatorial
explosion.</p>
@ -70,7 +70,7 @@ explosion.</p>
<hr>
<h2><a name="BOOST_PP_LIST_FOR_EACH_PRODUCT_R">#define BOOST_PP_LIST_FOR_EACH_PRODUCT_R</a>(R,F,N,T_OF_L)</h2>
<h2><a name="BOOST_PP_LIST_FOR_EACH_PRODUCT_R">#define BOOST_PP_LIST_FOR_EACH_PRODUCT_R</a>(R,MACRO,SIZE_OF_TUPLE,TUPLE_OF_LISTS)</h2>
<p>Can be used inside <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>().</p>
<hr>

View File

@ -26,9 +26,9 @@
<hr>
<h2><a name="BOOST_PP_LIST_REST_N">#define BOOST_PP_LIST_REST_N</a>(N,L)</h2>
<p>Expands to a list of all but the first <code>N</code> elements of the
list <code>L</code>.</p>
<h2><a name="BOOST_PP_LIST_REST_N">#define BOOST_PP_LIST_REST_N</a>(COUNT,LIST)</h2>
<p>Expands to a list of all but the first <code>COUNT</code> elements of the
list <code>LIST</code>.</p>
<p>For example,</p>
@ -59,7 +59,7 @@ list <code>L</code>.</p>
<hr>
<h2><a name="BOOST_PP_LIST_REST_N_D">#define BOOST_PP_LIST_REST_N_D</a>(D,N,L)</h2>
<h2><a name="BOOST_PP_LIST_REST_N_D">#define BOOST_PP_LIST_REST_N_D</a>(D,COUNT,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_REVERSE">#define BOOST_PP_LIST_REVERSE</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_REVERSE">#define BOOST_PP_LIST_REVERSE</a>(LIST)</h2>
<p>List reversal.</p>
<p>For example,</p>
@ -53,7 +53,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_REVERSE_D">#define BOOST_PP_LIST_REVERSE_D</a>(D,L)</h2>
<h2><a name="BOOST_PP_LIST_REVERSE_D">#define BOOST_PP_LIST_REVERSE_D</a>(D,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_SIZE">#define BOOST_PP_LIST_SIZE</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_SIZE">#define BOOST_PP_LIST_SIZE</a>(LIST)</h2>
<p>Expands to the number of elements in the list.</p>
<p>For example,</p>
@ -49,7 +49,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_SIZE_D">#define BOOST_PP_LIST_SIZE_D</a>(D,L)</h2>
<h2><a name="BOOST_PP_LIST_SIZE_D">#define BOOST_PP_LIST_SIZE_D</a>(D,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_TO_TUPLE">#define BOOST_PP_LIST_TO_TUPLE</a>(L)</h2>
<h2><a name="BOOST_PP_LIST_TO_TUPLE">#define BOOST_PP_LIST_TO_TUPLE</a>(LIST)</h2>
<p>Converts the list to a tuple.</p>
<p>For example,</p>
@ -55,7 +55,7 @@
<hr>
<h2><a name="BOOST_PP_LIST_TO_TUPLE_R">#define BOOST_PP_LIST_TO_TUPLE_R</a>(R,L)</h2>
<h2><a name="BOOST_PP_LIST_TO_TUPLE_R">#define BOOST_PP_LIST_TO_TUPLE_R</a>(R,LIST)</h2>
<p>Can be used inside <a href="for.htm#BOOST_PP_FOR">BOOST_PP_FOR</a>().</p>
<hr>

View File

@ -26,17 +26,17 @@
<hr>
<h2><a name="BOOST_PP_LIST_TRANSFORM">#define BOOST_PP_LIST_TRANSFORM</a>(F,P,L)</h2>
<p>Applies the macro <code>F(D,P,X)</code> to each element <code>X</code>
<h2><a name="BOOST_PP_LIST_TRANSFORM">#define BOOST_PP_LIST_TRANSFORM</a>(OP,DATA,LIST)</h2>
<p>Applies the macro <code>OP(D,DATA,X)</code> to each element <code>X</code>
of the list producing a new list.</p>
<p>In other words, expands to:</p>
<pre>
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(F(D,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,0)),
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(F(D,P,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(L,1)),
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(OP(D,DATA,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,0)),
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(OP(D,DATA,<a href="list_at.htm#BOOST_PP_LIST_AT">BOOST_PP_LIST_AT</a>(LIST,1)),
...
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(F(D,P,<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)))),
<a href="list_adt.htm#BOOST_PP_LIST_CONS">BOOST_PP_LIST_CONS</a>(OP(D,DATA,<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)))),
<a href="list_adt.htm#BOOST_PP_LIST_NIL">BOOST_PP_LIST_NIL</a>) ... ))
</pre>
@ -65,7 +65,7 @@ of the list producing a new list.</p>
<hr>
<h2><a name="BOOST_PP_LIST_TRANSFORM_D">#define BOOST_PP_LIST_TRANSFORM_D</a>(D,F,P,L)</h2>
<h2><a name="BOOST_PP_LIST_TRANSFORM_D">#define BOOST_PP_LIST_TRANSFORM_D</a>(D,OP,DATA,LIST)</h2>
<p>Can be used inside <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>().</p>
<hr>

View File

@ -26,19 +26,19 @@
<hr>
<h2><a name="BOOST_PP_REPEAT">#define BOOST_PP_REPEAT</a>(N,M,P)</h2>
<p>Repeats the macro <code>M(I,P)</code> for <code>I = [0,N[</code>.</p>
<h2><a name="BOOST_PP_REPEAT">#define BOOST_PP_REPEAT</a>(COUNT,MACRO,DATA)</h2>
<p>Repeats the macro <code>MACRO(INDEX,DATA)</code> for <code>INDEX = [0,COUNT[</code>.</p>
<p>In other words, expands to the sequence:</p>
<pre>
M(0,P) M(1,P) ... M(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(N),P)
MACRO(0,DATA) MACRO(1,DATA) ... MACRO(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(COUNT),DATA)
</pre>
<p>For example,</p>
<pre>
#define TEST(I,P) P(I);
#define TEST(INDEX,DATA) DATA(INDEX);
<a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>(3,TEST,X)
</pre>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_REPEAT_2ND">#define BOOST_PP_REPEAT_2ND</a>(N,M,P)</h2>
<h2><a name="BOOST_PP_REPEAT_2ND">#define BOOST_PP_REPEAT_2ND</a>(COUNT,MACRO,DATA)</h2>
<p>Same as <a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>(), but implemented independently.</p>
<h3>Test</h3>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_REPEAT_3RD">#define BOOST_PP_REPEAT_3RD</a>(N,M,P)</h2>
<h2><a name="BOOST_PP_REPEAT_3RD">#define BOOST_PP_REPEAT_3RD</a>(COUNT,MACRO,DATA)</h2>
<p>Same as <a href="repeat.htm#BOOST_PP_REPEAT">BOOST_PP_REPEAT</a>(), but implemented independently.</p>
<hr>

View File

@ -26,19 +26,19 @@
<hr>
<h2><a name="BOOST_PP_REPEAT_FROM_TO">#define BOOST_PP_REPEAT_FROM_TO</a>(S,E,M,P)</h2>
<p>Repeats the macro <code>M(I,P)</code> for <code>I = [S,E[</code>.</p>
<h2><a name="BOOST_PP_REPEAT_FROM_TO">#define BOOST_PP_REPEAT_FROM_TO</a>(FIRST,LAST,MACRO,DATA)</h2>
<p>Repeats the macro <code>MACRO(INDEX,DATA)</code> for <code>INDEX = [FIRST,LAST[</code>.</p>
<p>In other words, expands to the sequence:</p>
<pre>
M(S,P) M(<a href="inc.htm#BOOST_PP_INC">BOOST_PP_INC</a>(S),P) ... M(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(E),P)
MACRO(FIRST,DATA) MACRO(<a href="inc.htm#BOOST_PP_INC">BOOST_PP_INC</a>(FIRST),DATA) ... MACRO(<a href="dec.htm#BOOST_PP_DEC">BOOST_PP_DEC</a>(LAST),DATA)
</pre>
<p>For example,</p>
<pre>
#define TEST(I,P) P(I);
#define TEST(INDEX,DATA) DATA(INDEX);
<a href="repeat_from_to.htm#BOOST_PP_REPEAT_FROM_TO">BOOST_PP_REPEAT_FROM_TO</a>(4,7,TEST,X)
</pre>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_REPEAT_FROM_TO_2ND">#define BOOST_PP_REPEAT_FROM_TO_2ND</a>(S,E,M,P)</h2>
<h2><a name="BOOST_PP_REPEAT_FROM_TO_2ND">#define BOOST_PP_REPEAT_FROM_TO_2ND</a>(FIRST,LAST,MACRO,DATA)</h2>
<p>Same as <a href="repeat_from_to.htm#BOOST_PP_REPEAT_FROM_TO">BOOST_PP_REPEAT_FROM_TO</a>(), but implemented independently.</p>
<hr>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_REPEAT_FROM_TO_3RD">#define BOOST_PP_REPEAT_FROM_TO_3RD</a>(S,E,M,P)</h2>
<h2><a name="BOOST_PP_REPEAT_FROM_TO_3RD">#define BOOST_PP_REPEAT_FROM_TO_3RD</a>(FIRST,LAST,MACRO,DATA)</h2>
<p>Same as <a href="repeat_from_to.htm#BOOST_PP_REPEAT_FROM_TO">BOOST_PP_REPEAT_FROM_TO</a>(), but implemented independently.</p>
<hr>

View File

@ -26,8 +26,8 @@
<hr>
<h2><a name="BOOST_PP_TUPLE_EAT">#define BOOST_PP_TUPLE_EAT</a>(N)</h2>
<p>Expands to a macro that eats a tuple of the specified length.</p>
<h2><a name="BOOST_PP_TUPLE_EAT">#define BOOST_PP_TUPLE_EAT</a>(SIZE_OF_TUPLE)</h2>
<p>Expands to a macro that eats a tuple of the specified size.</p>
<p><a href="tuple_eat.htm#BOOST_PP_TUPLE_EAT">BOOST_PP_TUPLE_EAT</a>() is designed to be used with <a href="if.htm#BOOST_PP_IF">BOOST_PP_IF</a>() like
<a href="empty.htm#BOOST_PP_EMPTY">BOOST_PP_EMPTY</a>().</p>

View File

@ -26,8 +26,8 @@
<hr>
<h2><a name="BOOST_PP_TUPLE_ELEM">#define BOOST_PP_TUPLE_ELEM</a>(N,I,T)</h2>
<p>Expands to the <code>I</code>:th element of an <code>N</code>-tuple.</p>
<h2><a name="BOOST_PP_TUPLE_ELEM">#define BOOST_PP_TUPLE_ELEM</a>(SIZE_OF_TUPLE,INDEX,TUPLE)</h2>
<p>Expands to the <code>INDEX</code>:th element of an <code>SIZE_OF_TUPLE</code>-tuple.</p>
<p>For example,</p>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_TUPLE_REVERSE">#define BOOST_PP_TUPLE_REVERSE</a>(N,T)</h2>
<h2><a name="BOOST_PP_TUPLE_REVERSE">#define BOOST_PP_TUPLE_REVERSE</a>(SIZE_OF_TUPLE,TUPLE)</h2>
<p>Tuple reversal.</p>
<p>For example,</p>

View File

@ -26,7 +26,7 @@
<hr>
<h2><a name="BOOST_PP_TUPLE_TO_LIST">#define BOOST_PP_TUPLE_TO_LIST</a>(N,T)</h2>
<h2><a name="BOOST_PP_TUPLE_TO_LIST">#define BOOST_PP_TUPLE_TO_LIST</a>(SIZE_OF_TUPLE,TUPLE)</h2>
<p>Converts a tuple to a list.</p>
<p>For example,</p>

View File

@ -26,23 +26,23 @@
<hr>
<h2><a name="BOOST_PP_WHILE">#define BOOST_PP_WHILE</a>(C,F,X)</h2>
<p>Iterates <code>F(D,X)</code> while <code>C(D,X)</code> is true.</p>
<h2><a name="BOOST_PP_WHILE">#define BOOST_PP_WHILE</a>(PRED,OP,STATE)</h2>
<p>Iterates <code>OP(D,STATE)</code> while <code>PRED(D,STATE)</code> is true.</p>
<p>In other words, expands to:</p>
<pre>
F(D, ... F(D, F(D,X) ) ... )
OP(D, ... OP(D, OP(D,STATE) ) ... )
</pre>
<p>The depth of iteration is determined by <code>C(D,X)</code>.</p>
<p>The depth of iteration is determined by <code>PRED(D,STATE)</code>.</p>
<p>For example,</p>
<pre>
#define C(D,X) <a href="comparison_less.htm#BOOST_PP_LESS_D">BOOST_PP_LESS_D</a>(D,<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,0,X),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
#define F(D,X) (<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,X)),<a href="tuple_elem.htm#BOOST_PP_TUPLE_ELEM">BOOST_PP_TUPLE_ELEM</a>(2,1,X))
<a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>(C,F,(0,3))
#define PRED(D,STATE) <a href="comparison_less.htm#BOOST_PP_LESS_D">BOOST_PP_LESS_D</a>(D,<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(D,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))
<a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>(PRED,OP,(0,3))
</pre>
<p>expands to:</p>
@ -53,11 +53,11 @@
<h3>Legend</h3>
<ul>
<li><b>X</b> is the current state of iteration. The state is usually a tuple.</li>
<li><b>C</b> is the condition for iteration. It must expand to a decimal
<li><b>STATE</b> is the current state of iteration. The state is usually a tuple.</li>
<li><b>PRED</b> is the condition for iteration. It must expand to a decimal
integer literal.</li>
<li><b>F</b> is the iterated macro. Note that if the state is a tuple, then
F(D,X) usually expands to a tuple of the same number of elements.</li>
<li><b>OP</b> is the iterated macro. Note that if the state is a tuple, then
OP(D,STATE) usually expands to a tuple of the same number of elements.</li>
<li><b>D</b> is the recursion depth and should only be used as a parameter
to other macros using <a href="while.htm#BOOST_PP_WHILE">BOOST_PP_WHILE</a>(). Such macros include
<a href="arithmetic_add.htm#BOOST_PP_ADD">BOOST_PP_ADD</a>() and other arithmetic operations. For each macro using