lib cleanup

[SVN r15693]
This commit is contained in:
Paul Mensonides
2002-10-03 22:13:37 +00:00
parent ae584c68b2
commit 4bb690a819
263 changed files with 14965 additions and 16 deletions

57
doc/ref/add.html Normal file
View File

@ -0,0 +1,57 @@
<html>
<head>
<title>BOOST_PP_ADD</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ADD</b> macro expands to the sum of its arguments.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ADD</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The first addend of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The second addend of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If the sum of <i>x</i> and <i>y</i> is greater than <b>BOOST_PP_LIMIT_MAG</b>, the result is saturated to <b>BOOST_PP_LIMIT_MAG</b>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_ADD_D</b> in such a situation.
</div>
<div>
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.&nbsp;
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.&nbsp;
In other words, <i>x</i> should be the addend that is <i>most likely</i> to be the largest of the two operands.
</div>
<h4>See Also</h4>
<ul>
<li><a href="add_d.html">BOOST_PP_ADD_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/add.hpp.html">&lt;boost/preprocessor/arithmetic/add.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include <a href="../headers/arithmetic/add.hpp.html">&lt;boost/preprocessor/arithmetic/add.hpp&gt;</a>
<a href="add.html">BOOST_PP_ADD</a>(4, 3) // expands to 7
</pre></div>
</body>
</html>

79
doc/ref/add_d.html Normal file
View File

@ -0,0 +1,79 @@
<html>
<head>
<title>BOOST_PP_ADD_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ADD_D</b> macro expands to the sum of its second and third arguments.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ADD_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The first addend of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The second addend of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If the sum of <i>x</i> and <i>y</i> is greater than <b>BOOST_PP_LIMIT_MAG</b>, the result is saturated to <b>BOOST_PP_LIMIT_MAG</b>.
</div>
<div>
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.&nbsp;
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.&nbsp;
In other words, <i>x</i> should be the addend that is <i>most likely</i> to be the largest of the two operands.
</div>
<h4>See Also</h4>
<ul>
<li><a href="add.html">BOOST_PP_ADD</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/add.hpp.html">&lt;boost/preprocessor/arithmetic/add.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/add.hpp.html">boost/preprocessor/arithmetic/add.hpp</a>&gt;
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
#include &lt;<a href="../headers/control/while.hpp.html">boost/preprocessor/control/while.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define PRED(d, data) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, data)
#define OP(d, data) \
( \
<a href="dec.html">BOOST_PP_DEC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, data) \
), \
<a href="add_d.html">BOOST_PP_ADD_D</a>( \
d, \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, data), \
2 \
) \
) \
/**/
// increment 'x' by 2 'n' times
#define STRIDE(x, n) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, <a href="while.html">BOOST_PP_WHILE</a>(PRED, OP, (n, x)))
STRIDE(10, 2) // expands to 14
STRIDE(51, 6) // expands to 63
</pre></div>
</body>
</html>

53
doc/ref/and.html Normal file
View File

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_AND</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_AND</b> macro expands to the logical <i>AND</i> of its operands.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_AND</b>(<i>p</i>, <i>q</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>p</dt>
<dd>
The left operand of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>q</dt>
<dd>
The right operand of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If both <i>p</i> and <i>q</i> are non-zero, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro performs a boolean conversion on each operand before performing the logical <i>AND</i> operation.&nbsp;
If that conversion is not necessary, use <b>BOOST_PP_BITAND</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="bitand.html">BOOST_PP_BITAND</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/and.hpp.html">&lt;boost/preprocessor/logical/and.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/and.hpp.html">boost/preprocessor/logical/and.hpp</a>&gt;
<a href="and.html">BOOST_PP_AND</a>(4, 3) // expands to 1
<a href="and.html">BOOST_PP_AND</a>(5, 0) // expands to 0
</pre></div>
</body>
</html>

53
doc/ref/apply.html Normal file
View File

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_APPLY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_APPLY</b> macro abstracts the difference between an argument and nothing.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_APPLY</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The abstracted argument.&nbsp;
This argument must be either <b>BOOST_PP_NIL</b> or a <i>tuple</i> with one element--such as <i>(arg)</i> or <i>((a, b))</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is <b>BOOST_PP_NIL</b>, this macro expands to nothing.&nbsp;
If <i>x</i> is a one element <i>tuple</i>, it expands to the contents of that <i>tuple</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="nil.html">BOOST_PP_NIL</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/facilities/apply.hpp.html">&lt;boost/preprocessor/facilities/apply.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/facilities/apply.hpp.html">boost/preprocessor/facilities/apply.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define CV(i) \
<a href="apply.html">BOOST_PP_APPLY</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>( \
4, i, \
(<a href="nil.html">BOOST_PP_NIL</a>, (const), (volatile), (const volatile)) \
) \
) \
/**/
CV(0) // expands to nothing
CV(1) // expands to const
</pre></div>
</body>
</html>

38
doc/ref/array_data.html Normal file
View File

@ -0,0 +1,38 @@
<html>
<head>
<title>BOOST_PP_ARRAY_DATA</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ARRAY_DATA</b> macro extracts the <i>tuple</i> data from an <i>array</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ARRAY_DATA</b>(<i>array</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>array</dt>
<dd>
An <i>array</i> to be converted to a <i>tuple</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the data portion of an <i>array</i> which is a <i>tuple</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/array/data.hpp.html">&lt;boost/preprocessor/array/data.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/array/data.hpp.html">boost/preprocessor/array/data.hpp</a>&gt;
#define ARRAY (3, (x, y, z))
<a href="array_data.html">BOOST_PP_ARRAY_DATA</a>(ARRAY) // expands to (x, y, z)
</pre></div>
</body>
</html>

40
doc/ref/array_elem.html Normal file
View File

@ -0,0 +1,40 @@
<html>
<head>
<title>BOOST_PP_ARRAY_ELEM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ARRAY_ELEM</b> macro extracts an element from a <i>array</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ARRAY_ELEM</b>(<i>i</i>, <i>array</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The zero-based index into the <i>array</i> of the element to be extracted.&nbsp;
</dd>
<dt>array</dt>
<dd>
The <i>array</i> from which an element is to be extracted.&nbsp;
This <i>array</i> must contain at least <i>i</i> + <i>1</i> elements.
</dd>
</dl>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/array/elem.hpp.html">&lt;boost/preprocessor/array/elem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/array/elem.hpp.html">boost/preprocessor/array/elem.hpp</a>&gt;
#define ARRAY (4, (a, b, c, d))
<a href="array_elem.html">BOOST_PP_ARRAY_ELEM</a>(0, ARRAY) // expands to a
<a href="array_elem.html">BOOST_PP_ARRAY_ELEM</a>(3, ARRAY) // expands to d
</pre></div>
</body>
</html>

34
doc/ref/array_size.html Normal file
View File

@ -0,0 +1,34 @@
<html>
<head>
<title>BOOST_PP_ARRAY_SIZE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ARRAY_SIZE</b> macro expands to the size of the <i>array</i> passed to it.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ARRAY_SIZE</b>(<i>array</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>array</dt>
<dd>
An <i>array</i> whose size is to be extracted.
</dd>
</dl>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/array/size.hpp.html">&lt;boost/preprocessor/array/size.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/array/size.hpp.html">boost/preprocessor/array/size.hpp</a>&gt;
#define ARRAY (3, (x, y, z))
<a href="array_size.html">BOOST_PP_ARRAY_SIZE</a>(ARRAY) // expands to 3
</pre></div>
</body>
</html>

103
doc/ref/assert.html Normal file
View File

@ -0,0 +1,103 @@
<html>
<head>
<title>BOOST_PP_ASSERT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ASSERT</b> macro conditionally causes a preprocessing error.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ASSERT</b>(<i>cond</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>cond</dt>
<dd>
A condition that determines whether an assertion occurs.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>cond</i> expands to <i>0</i>, this macro causes a preprocessing error.&nbsp;
Otherwise, it expands to nothing.
</div>
<h4>See Also</h4>
<ul>
<li><a href="assert_msg.html">BOOST_PP_ASSERT_MSG</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/debug/assert.hpp.html">&lt;boost/preprocessor/debug/assert.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/cat.hpp.html">boost/preprocessor/cat.hpp</a>&gt;
#include &lt;<a href="../headers/debug/assert.hpp.html">boost/preprocessor/debug/assert.hpp</a>&gt;
#include &lt;<a href="../headers/logical/bitnor.hpp.html">boost/preprocessor/logical/bitnor.hpp</a>&gt;
#include &lt;<a href="../headers/logical/compl.hpp.html">boost/preprocessor/logical/compl.hpp</a>&gt;
// The is BOOST_PP_IS_NULLARY macro is not part of
// the public interface of the library because it
// doesn't work on Borland preprocessors. It is
// only used here to illustrate assertions. In
// effect, it detects whether an argument is empty
// parenthesis or some text.
#include &lt;boost/preprocessor/detail/is_nullary.hpp&gt;
#define IS_EDISON_DESIGN_GROUP() \
<a href="compl.html">BOOST_PP_COMPL</a>( \
BOOST_PP_IS_NULLARY( \
<a href="cat.html">BOOST_PP_CAT</a>(IS_EDG_CHECK, __EDG_VERSION) \
) \
) \
/**/
#define IS_EDG_CHECK__EDG_VERSION ()
#define IS_METROWERKS() \
<a href="compl.html">BOOST_PP_COMPL</a>( \
BOOST_PP_IS_NULLARY( \
<a href="cat.html">BOOST_PP_CAT</a>(IS_MWERKS_CHECK, __MWERKS__) \
) \
) \
/**/
#define IS_MWERKS_CHECK__MWERKS__ ()
#define IS_MICROSOFT() \
<a href="bitnor.html">BOOST_PP_BITNOR</a>( \
IS_MICROSOFT_ROOT(), \
IS_EDISON_DESIGN_GROUP() \
) \
/**/
#define IS_MICROSOFT_ROOT() \
BOOST_PP_IS_NULLARY( \
<a href="cat.html">BOOST_PP_CAT</a>(IS_MSVC_CHECK, _MSC_VER) \
) \
/**/
#define IS_MSVC_CHECK_MS_VER ()
// this macro doesn't work on EDG...
// (this is just an example)
#define MACRO(n) \
<a href="cat.html">BOOST_PP_CAT</a>( \
MACRO_, \
IS_EDISON_DESIGN_GROUP() \
)(n) \
/**/
#define MACRO_1(n) \
<a href="assert.html">BOOST_PP_ASSERT</a>(0) \
"Edison Design Group is not supported" \
/**/
#define MACRO_0(n) normal mode: n
MACRO(10)
</pre></div>
</body>
</html>

55
doc/ref/assert_msg.html Normal file
View File

@ -0,0 +1,55 @@
<html>
<head>
<title>BOOST_PP_ASSERT_MSG</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ASSERT_MSG</b> macro conditionally inserts debugging text.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ASSERT_MSG</b>(<i>cond</i>, <i>msg</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>cond</dt>
<dd>
A condition that determines whether an assertion occurs.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>msg</dt>
<dd>
A message to display if <i>cond</i> evaluates to <i>0</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>cond</i> expands to <i>0</i>, this macro expands to <i>msg</i>.&nbsp;
Otherwise, it expands to nothing.
</div>
<h4>See Also</h4>
<ul>
<li><a href="assert_msg.html">BOOST_PP_ASSERT_MSG</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/debug/assert.hpp.html">&lt;boost/preprocessor/debug/assert.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/equal.hpp.html">boost/preprocessor/comparison/equal.hpp</a>&gt;
#include &lt;<a href="../headers/debug/assert.hpp.html">boost/preprocessor/debug/assert.hpp</a>&gt;
// lines are supposed to be counted
// in translation phase 1
#line 9
<a href="assert_msg.html">BOOST_PP_ASSERT_MSG</a>( \
BOOST_PP_EQUAL(__LINE__, 9), \
"incorrect line numbering detected" \
)
</pre></div>
</body>
</html>

50
doc/ref/assign_slot.html Normal file
View File

@ -0,0 +1,50 @@
<html>
<head>
<title>BOOST_PP_ASSIGN_SLOT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ASSIGN_SLOT</b> macro fully evaluates a numeric macro or expression.
</div>
<h4>Usage</h4>
<div class="code">
#include <b>BOOST_PP_ASSIGN_SLOT</b>(<i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The <i>slot</i> index that is to be assigned.&nbsp;
This value must be in the range of <i>1</i> to <b>BOOST_PP_LIMIT_SLOT_COUNT</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Prior to use, the <i>named external argument</i> <b>BOOST_PP_VALUE</b> must be defined.&nbsp;
Also, it must expand to a numeric value that is in the range of <i>0</i> to <i>2</i>^<i>32</i> - <i>1</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_slot_count.html">BOOST_PP_LIMIT_SLOT_COUNT</a></li>
<li><a href="value.html">BOOST_PP_VALUE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/slot/slot.hpp.html">&lt;boost/preprocessor/slot/slot.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/slot/slot.hpp.html">boost/preprocessor/slot/slot.hpp</a>&gt;
#define X() 4
#define <a href="value.html">BOOST_PP_VALUE</a> 1 + 2 + 3 + X()
#include <a href="assign_slot.html">BOOST_PP_ASSIGN_SLOT</a>(1)
#undef X
<a href="slot.html">BOOST_PP_SLOT</a>(1) // expands to 10
</pre></div>
</body>
</html>

54
doc/ref/bitand.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_BITAND</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_BITAND</b> macro expands to the bitwise <i>AND</i> of its operands.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_BITAND</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
<dt>y</dt>
<dd>
The right operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If both <i>x</i> and <i>y</i> are <i>1</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro <i>does not</i> perform a boolean conversion on either operand before performing the bitwise <i>AND</i> operation.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_AND</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="and.html">BOOST_PP_AND</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/bitand.hpp.html">&lt;boost/preprocessor/logical/bitand.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/bitand.hpp.html">boost/preprocessor/logical/bitand.hpp</a>&gt;
<a href="bitand.html">BOOST_PP_BITAND</a>(0, 0) // expands to 0
<a href="bitand.html">BOOST_PP_BITAND</a>(0, 1) // expands to 0
<a href="bitand.html">BOOST_PP_BITAND</a>(1, 0) // expands to 0
<a href="bitand.html">BOOST_PP_BITAND</a>(1, 1) // expands to 1
</pre></div>
</body>
</html>

54
doc/ref/bitnor.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_BITNOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_BITNOR</b> macro expands to the bitwise <i>NOR</i> of its operands.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_BITNOR</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
<dt>y</dt>
<dd>
The right operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If neither <i>x</i> nor <i>y</i> is <i>1</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro <i>does not</i> perform a boolean conversion on either operand before performing the bitwise <i>NOR</i> operation.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_NOR</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="nor.html">BOOST_PP_NOR</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/bitnor.hpp.html">&lt;boost/preprocessor/logical/bitnor.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/bitnor.hpp.html">boost/preprocessor/logical/bitnor.hpp</a>&gt;
<a href="bitnor.html">BOOST_PP_BITNOR</a>(0, 0) // expands to 1
<a href="bitnor.html">BOOST_PP_BITNOR</a>(0, 1) // expands to 0
<a href="bitnor.html">BOOST_PP_BITNOR</a>(1, 0) // expands to 0
<a href="bitnor.html">BOOST_PP_BITNOR</a>(1, 1) // expands to 0
</pre></div>
</body>
</html>

54
doc/ref/bitor.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_BITOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_BITOR</b> macro expands to the bitwise <i>OR</i> of its operands.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_BITOR</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
<dt>y</dt>
<dd>
The right operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If either <i>x</i> or <i>y</i> is <i>1</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro <i>does not</i> perform a boolean conversion on either operand before performing the bitwise <i>OR</i> operation.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_OR</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="or.html">BOOST_PP_OR</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/bitor.hpp.html">&lt;boost/preprocessor/logical/bitor.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/bitor.hpp.html">boost/preprocessor/logical/bitor.hpp</a>&gt;
<a href="bitor.html">BOOST_PP_BITOR</a>(0, 0) // expands to 0
<a href="bitor.html">BOOST_PP_BITOR</a>(0, 1) // expands to 1
<a href="bitor.html">BOOST_PP_BITOR</a>(1, 0) // expands to 1
<a href="bitor.html">BOOST_PP_BITOR</a>(1, 1) // expands to 1
</pre></div>
</body>
</html>

55
doc/ref/bitxor.html Normal file
View File

@ -0,0 +1,55 @@
<html>
<head>
<title>BOOST_PP_BITXOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_BITXOR</b> macro expands to the bitwise <i>XOR</i> of its operands.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_BITXOR</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
<dt>y</dt>
<dd>
The right operand of the operation.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If either <i>x</i> or <i>y</i> is <i>1</i> exclusively, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro <i>does not</i> perform a boolean conversion on either operand before performing the bitwise <i>OR</i> operation.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_XOR</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="xor.html">BOOST_PP_XOR</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/bitxor.hpp.html">&lt;boost/preprocessor/logical/bitxor.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/bitxor.hpp.html">boost/preprocessor/logical/bitxor.hpp</a>&gt;
<a href="bitxor.html">BOOST_PP_BITXOR</a>(0, 0) // expands to 0
<a href="bitxor.html">BOOST_PP_BITXOR</a>(0, 1) // expands to 1
<a href="bitxor.html">BOOST_PP_BITXOR</a>(1, 0) // expands to 1
<a href="bitxor.html">BOOST_PP_BITXOR</a>(1, 1) // expands to 0
</pre></div>
</body>
</html>

43
doc/ref/bool.html Normal file
View File

@ -0,0 +1,43 @@
<html>
<head>
<title>BOOST_PP_BOOL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_BOOL</b> macro performs a boolean conversion on its operand.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_BOOL</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The value to be converted.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is <i>0</i>, this macro expands to <i>0</i>.&nbsp;
Otherwise it expands to <i>1</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/bool.hpp.html">&lt;boost/preprocessor/logical/bool.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/bool.hpp.html">boost/preprocessor/logical/bool.hpp</a>&gt;
<a href="bool.hpp">BOOST_PP_BOOL</a>(6) // expands to 1
<a href="bool.hpp">BOOST_PP_BOOL</a>(0) // expands to 0
</pre></div>
</body>
</html>

46
doc/ref/cat.html Normal file
View File

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_CAT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_CAT</b> macro concatenates its arguments after they have been expanded.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_CAT</b>(<i>a</i>, <i>b</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>a</dt>
<dd>
The left operand of the concatenation.
</dd>
<dt>b</dt>
<dd>
The right operand of the concatenation.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The preprocessor token-pasting operator (<b>##</b>) prevents arguments from expanding.&nbsp;
This macro allows its arguments to expand before concatenation.
</div>
<div>
Concatenation must not result in an invocation of a macro that uses <b>BOOST_PP_CAT</b>.&nbsp;
If that happens, <b>BOOST_PP_CAT</b> will not expand the second time.
</div>
<!-- <h4>See Also</h4> -->
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/cat.hpp.html">&lt;boost/preprocessor/cat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/cat.hpp.html">boost/preprocessor/cat.hpp</a>&gt;
<a href="cat.html">BOOST_PP_CAT</a>(x, <a href="cat.html">BOOST_PP_CAT</a>(y, z)) // expands to xyz
</pre></div>
</body>
</html>

32
doc/ref/comma.html Normal file
View File

@ -0,0 +1,32 @@
<html>
<head>
<title>BOOST_PP_COMMA</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_COMMA</b> macro expands to a comma.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_COMMA</b>()
</div>
<h4>Remarks</h4>
<div>
The preprocessor interprets commas as argument separators in macro invocations.&nbsp;
Because of this, commas require special handling.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/punctuation/comma.hpp.html">&lt;boost/preprocessor/punctuation/comma.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/if.hpp.html">boost/preprocessor/control/if.hpp</a>&gt;
#include &lt;<a href="../headers/facilities/empty.hpp.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
#include &lt;<a href="../headers/punctuation/comma.hpp.html">boost/preprocessor/punctuation/comma.hpp</a>&gt;
<a href="if.html">BOOST_PP_IF</a>(1, <a href="comma.html">BOOST_PP_COMMA</a>, <a href="empty.html">BOOST_PP_EMPTY</a>)() // expands to ,
</pre></div>
</body>
</html>

49
doc/ref/comma_if.html Normal file
View File

@ -0,0 +1,49 @@
<html>
<head>
<title>BOOST_PP_COMMA_IF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_COMMA_IF</b> macro conditionally expands to a comma.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_COMMA_IF</b>(<i>cond</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>cond</dt>
<dd>
The condition that determines if a the macro expands to a comma or nothing.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>cond</i> expands to <i>0</i>, this macro expands to nothing.&nbsp;
Otherwise, it expands to a comma.
</div>
<div>
The preprocessor interprets commas as argument separators in macro invocations.&nbsp;
Because of this, commas require special handling.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/punctuation/comma_if.hpp.html">&lt;boost/preprocessor/punctuation/comma_if.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/punctuation/comma_if.hpp.html">boost/preprocessor/punctuation/comma_if.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
#define MACRO(z, n, text) <a href="comma_if.html">BOOST_PP_COMMA_IF</a>(n) text
<a href="repeat.html">BOOST_PP_REPEAT</a>(3, MACRO, class) // expands to class, class, class
</pre></div>
</body>
</html>

47
doc/ref/compl.html Normal file
View File

@ -0,0 +1,47 @@
<html>
<head>
<title>BOOST_PP_COMPL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_COMPL</b> macro performs a bitwise inversion (bitwise <i>NOT</i> or one's complement) on its operand.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_COMPL</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The value to be converted.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is <i>0</i>, this macro expands to <i>1</i>.&nbsp;
If <i>x</i> is <i>1</i>, this it expands to <i>0</i>.
</div>
<div>
This macro <i>does not</i> perform a boolean conversion on its operand before performing the inversion <i>OR</i> operation.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_NOT</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="not.html">BOOST_PP_NOT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/logical/compl.hpp.html">&lt;boost/preprocessor/logical/compl.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/logical/compl.hpp.html">boost/preprocessor/logical/compl.hpp</a>&gt;
<a href="compl.html">BOOST_PP_COMPL</a>(1) // expands to 0
<a href="compl.html">BOOST_PP_COMPL</a>(0) // expands to 1
</pre></div>
</body>
</html>

View File

@ -0,0 +1,33 @@
<html>
<head>
<title>BOOST_PP_CONFIG_EXTENDED_LINE_INFO</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_CONFIG_EXTENDED_LINE_INFO</b> is a user-defined macro that determines whether <b>BOOST_PP_LINE</b> outputs extended <i>file-iteration</i> state information.
</div>
<h4>Usage</h4>
<div class="code">
#define <b>BOOST_PP_CONFIG_EXTENDED_LINE_INFO</b> <i>n</i>
</div>
<h4>Arguments</h4>
<dl>
<dt>n</dt>
<dd>
The value that determines if <b>BOOST_PP_LINE</b> outputs extended <i>file-iteration</i> information.&nbsp;
This value must be <i>0</i> or <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>n</i> is <i>1</i>, <b>BOOST_PP_LINE</b> will output extended data.&nbsp;
By default, this macro is set to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="line.html">BOOST_PP_LINE</a></li>
</ul>
</body>
</html>

43
doc/ref/dec.html Normal file
View File

@ -0,0 +1,43 @@
<html>
<head>
<title>BOOST_PP_DEC</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DEC</b> macro expands to one less than its argument.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DEC</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The value to be decremented.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is <i>0</i>, the result is saturated to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="inc.html">BOOST_PP_INC</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/dec.hpp.html">&lt;boost/preprocessor/arithmetic/dec.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
<a href="dec.html">BOOST_PP_DEC</a>(<a href="dec.html">BOOST_PP_DEC</a>(6)) // expands to 4
<a href="dec.html">BOOST_PP_DEC</a>(0) // expands to 0
</pre></div>
</body>
</html>

71
doc/ref/deduce_d.html Normal file
View File

@ -0,0 +1,71 @@
<html>
<head>
<title>BOOST_PP_DEDUCE_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DEDUCE_D</b> macro manually deduces the state of the <b>BOOST_PP_WHILE</b> construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DEDUCE_D</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is intended to avoid the use of <i>automatic-recursion</i> at deep expansion depths.&nbsp;
<i>Automatic-recursion</i> at such depths can be inefficient on some preprocessors.&nbsp;
It is not intended to be used directly with the invocation of macros with a <b>_D</b> suffix such as:
<div>
<b>BOOST_PP_ADD_D</b>(<b>BOOST_PP_DEDUCE_D</b>(), <i>x</i>, <i>y</i>)
</div>
If it is used in this context, the <b>_D</b> macro will fail.&nbsp;
The <b>_D</b> macros directly concatenate to the <i>d</i> parameter that is passed to them,
which would prevent <b>BOOST_PP_DEDUCE_D</b>() from expanding.&nbsp;
Furthermore, it is pointless to use this macro in a situation such as this
because it would already be too late to gain any efficiency.
</div>
<h4>See Also</h4>
<ul>
<li><a href="while.html">BOOST_PP_WHILE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/control/deduce_d.hpp.html">&lt;boost/preprocessor/control/deduce_d.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/add.hpp.html">boost/preprocessor/arithmetic/add.hpp</a>&gt;
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/arithmetic/sub.hpp.html">boost/preprocessor/arithmetic/sub.hpp</a>&gt;
#include &lt;<a href="../headers/control/deduce_d.hpp.html">boost/preprocessor/control/deduce_d.hpp</a>&gt;
#include &lt;<a href="../headers/punctuation/comma_if.hpp.html">boost/preprocessor/punctuation/comma_if.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define RANGE(first, last) \
<a href="repeat.html">BOOST_PP_REPEAT</a>( \
<a href="inc.html">BOOST_PP_INC</a>( \
<a href="sub.html">BOOST_PP_SUB</a>(last, first) \
, \
RANGE_M, \
(first, <a href="deduce_d.html">BOOST_PP_DEDUCE_D</a>()) \
) \
/**/
#define RANGE_M(z, n, data) \
RANGE_M_2( \
n, \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, data), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, data) \
) \
/**/
#define RANGE_M_2(n, first, d) \
<a href="comma_if.html">BOOST_PP_COMMA_IF</a>(n) <a href="add_d.html">BOOST_PP_ADD_D</a>(d, n, first) \
/**/
RANGE(5, 10) // expands to 5, 6, 7, 8, 9, 10
</pre></div>
</body>
</html>

37
doc/ref/deduce_r.html Normal file
View File

@ -0,0 +1,37 @@
<html>
<head>
<title>BOOST_PP_DEDUCE_R</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DEDUCE_R</b> macro manually deduces the state of the <b>BOOST_PP_FOR</b> construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DEDUCE_R</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is intended to avoid the use of <i>automatic-recursion</i> at deep expansion depths.&nbsp;
<i>Automatic-recursion</i> at such depths can be inefficient on some preprocessors.&nbsp;
It is not intended to be used directly with the invocation of macros with a <b>_R</b> suffix such as:
<div>
<b>BOOST_PP_LIST_ENUM_R</b>(<b>BOOST_PP_DEDUCE_R</b>(), (a, (b, (c, <b>BOOST_PP_NIL</b>))))
</div>
If it is used in this context, the <b>_R</b> macro will fail.&nbsp;
The <b>_R</b> macros directly concatenate to the <i>r</i> parameter that is passed to them,
which would prevent <b>BOOST_PP_DEDUCE_R</b>() from expanding.&nbsp;
Furthermore, it is pointless to use this macro in a situation such as this
because it would already be too late to gain any efficiency.
</div>
<h4>See Also</h4>
<ul>
<li><a href="for.html">BOOST_PP_FOR</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/deduce_r.hpp.html">&lt;boost/preprocessor/repetition/deduce_r.hpp&gt;</a>
</div>
</body>
</html>

37
doc/ref/deduce_z.html Normal file
View File

@ -0,0 +1,37 @@
<html>
<head>
<title>BOOST_PP_DEDUCE_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DEDUCE_Z</b> macro manually deduces the state of the <b>BOOST_PP_REPEAT</b> construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DEDUCE_Z</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is intended to avoid the use of <i>automatic-recursion</i> at deep expansion depths.&nbsp;
<i>Automatic-recursion</i> at such depths can be inefficient on some preprocessors.&nbsp;
It is not intended to be used directly with the invocation of macros with a <b>_Z</b> suffix such as:
<div>
<b>BOOST_PP_ENUM_PARAMS_Z</b>(<b>BOOST_PP_DEDUCE_Z</b>(), (a, (b, (c, <b>BOOST_PP_NIL</b>))))
</div>
If it is used in this context, the <b>_Z</b> macro will fail.&nbsp;
The <b>_Z</b> macros directly concatenate to the <i>r</i> parameter that is passed to them,
which would prevent <b>BOOST_PP_DEDUCE_Z</b>() from expanding.&nbsp;
Furthermore, it is pointless to use this macro in a situation such as this
because it would already be too late to gain any efficiency.
</div>
<h4>See Also</h4>
<ul>
<li><a href="repeat.html">BOOST_PP_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/deduce_z.hpp.html">&lt;boost/preprocessor/repetition/deduce_z.hpp&gt;</a>
</div>
</body>
</html>

52
doc/ref/div.html Normal file
View File

@ -0,0 +1,52 @@
<html>
<head>
<title>BOOST_PP_DIV</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DIV</b> macro expands to the quotient of its arguments.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DIV</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The dividend (numerator) of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The divisor (denominator) of the operation.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_DIV_D</b> in such a situation.
</div>
<div>
If <i>y</i> is <i>0</i>, the result is undefined.
</div>
<h4>See Also</h4>
<ul>
<li><a href="div_d.html">BOOST_PP_DIV_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/div.hpp.html">&lt;boost/preprocessor/arithmetic/div.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/div.hpp.html">boost/preprocessor/arithmetic/div.hpp</a>&gt;
<a href="div.html">BOOST_PP_DIV</a>(11, 5) // expands to 2
</pre></div>
</body>
</html>

74
doc/ref/div_d.html Normal file
View File

@ -0,0 +1,74 @@
<html>
<head>
<title>BOOST_PP_DIV_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_DIV_D</b> macro expands to the quotient of its second and third arguments.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_DIV_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The dividend (numerator) of the operation.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The divisor (denominator) of the operation.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>y</i> is <i>0</i>, the result is undefined.
</div>
<h4>See Also</h4>
<ul>
<li><a href="div.html">BOOST_PP_DIV</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/div.hpp.html">&lt;boost/preprocessor/arithmetic/div.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
#include &lt;<a href="../headers/arithmetic/div.hpp.html">boost/preprocessor/arithmetic/div.hpp</a>&gt;
#include &lt;<a href="../headers/control/while.hpp.html">boost/preprocessor/control/while.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define PRED(d, data) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, data)
#define OP(d, data) \
( \
<a href="dec.html">BOOST_PP_DEC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, data) \
), \
<a href="div_d.html">BOOST_PP_DIV_D</a>( \
d, \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, data), \
2 \
) \
) \
/**/
// halve 'x' 'n' times
#define HALVE(x, n) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, <a href="while.html">BOOST_PP_WHILE</a>(PRED, OP, (n, x)))
HALVE(8, 2) // expands to 2
HALVE(16, 1) // expands to 8
</pre></div>
</body>
</html>

36
doc/ref/empty.html Normal file
View File

@ -0,0 +1,36 @@
<html>
<head>
<title>BOOST_PP_EMPTY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EMPTY</b> macro is a nullary utility macro that expands to nothing.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EMPTY</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is helps avoid inefficient macro-expansion.&nbsp;
It is primarily useful as arguments to <b>BOOST_PP_IF</b> or <b>BOOST_PP_IIF</b>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/facilities/empty.hpp.html">&lt;boost/preprocessor/facilities/empty.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/if.hpp.html">boost/preprocessor/control/if.hpp</a>&gt;
#include &lt;<a href="../headers/facilities/empty.hpp.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
#define X() result
#define MACRO(c) <a href="if.html">BOOST_PP_IF</a>(c, X, <a href="empty.html">BOOST_PP_EMPTY</a>)()
MACRO(0) // expands to nothing
MACRO(1) // expands to result
</pre></div>
</body>
</html>

69
doc/ref/enum.html Normal file
View File

@ -0,0 +1,69 @@
<html>
<head>
<title>BOOST_PP_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM</b> macro generates a comma-separated list.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM</b>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>), <i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
The <i>z</i> value that is passed to <i>macro</i> represents the next available repetition dimension.&nbsp;
Other macros that have <b>_Z</b> suffix variants internally use <b>BOOST_PP_REPEAT</b>--for example, <b>BOOST_PP_ENUM_PARAMS</b> and <b>BOOST_PP_ENUM_PARAMS_Z</b>.&nbsp;
Using these <b>_Z</b> versions is not strictly necessary, but passing the <i>z</i> value (that is passed to <i>macro</i>) to these macros allows them to reenter <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<div>
To directly use this <i>z</i> value, rather than simply passing it to another macro, see <b>BOOST_PP_ENUM_<i>z</i></b>.
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_z.html">BOOST_PP_ENUM_<i>z</i></a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum.hpp.html">&lt;boost/preprocessor/repetition/enum.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum.hpp.html">boost/preprocessor/repetition/enum.hpp</a>&gt;
#define TEXT(z, n, text) text
<a href="enum.html">BOOST_PP_ENUM</a>(4, TEXT, class) // expands to class, class, class, class
</pre></div>
</body>
</html>

View File

@ -0,0 +1,65 @@
<html>
<head>
<title>BOOST_PP_ENUM_BINARY_PARAMS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_BINARY_PARAMS</b> macro generates a comma-separated list of binary parameters.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_BINARY_PARAMS</b>(<i>count</i>, <i>p1</i>, <i>p2</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>p1</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>p2</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>p1</i> ## <i>0</i> <i>p2</i> ## <i>0</i>, <i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_BINARY_PARAMS_Z</b>.
</div>
<div>
This macro is a replacement for both <b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b> and <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_binary_params_z.html">BOOST_PP_ENUM_BINARY_PARAMS_Z</a></li>
<li><a href="enum_params_with_a_default.html">BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a></li>
<li><a href="enum_params_with_defaults.html">BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_binary_params.hpp.html">&lt;boost/preprocessor/repetition/enum_binary_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_binary_params.hpp.html">boost/preprocessor/repetition/enum_binary_params.hpp</a>&gt;
<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, T, p) // expands to T0 p0, T1 p1, T2 p2
</pre></div>
</body>
</html>

View File

@ -0,0 +1,82 @@
<html>
<head>
<title>BOOST_PP_ENUM_BINARY_PARAMS_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_BINARY_PARAMS_Z</b> macro generates a comma-separated list of binary parameters.&nbsp;
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_BINARY_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>p1</i>, <i>p2</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>p1</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>p2</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>p1</i> ## <i>0</i> <i>p2</i> ## <i>0</i>, <i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
This macro is a replacement for both <b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b> and <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a></li>
<li><a href="enum_params_with_a_default.html">BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a></li>
<li><a href="enum_params_with_defaults.html">BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_binary_params.hpp.html">&lt;boost/preprocessor/repetition/enum_binary_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_binary_params.hpp.html">boost/preprocessor/repetition/enum_binary_params.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_params.hpp.html">boost/preprocessor/repetition/enum_params.hpp</a>&gt;
#define FUNCTION(z, n, _) \
template&lt;<a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), class T)&gt; \
void f(<a href="enum_binary_params_z.html">BOOST_PP_ENUM_BINARY_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), T, p)) { \
/* ... */ \
} \
/**/
<a href="repeat.html">BOOST_PP_REPEAT</a>(2, FUNCTION, nil)
/*
expands to...
template&lt;class T0&gt; void f(T0 p0) { }
template&lt;class T0, class T1&gt; void f(T0 p0, T1 p1) { }
*/
</pre></div>
</body>
</html>

58
doc/ref/enum_params.html Normal file
View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_ENUM_PARAMS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_PARAMS</b> macro generates a comma-separated list of parameters.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_PARAMS</b>(<i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>0</i>, <i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_PARAMS_Z</b>.
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_params.hpp.html">&lt;boost/preprocessor/repetition/enum_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_params.hpp.html">boost/preprocessor/repetition/enum_params.hpp</a>&gt;
<a href="enum_params.html">BOOST_PP_ENUM_PARAMS</a>(3, class T) // expands to class T0, class T1, class T2
</pre></div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<html>
<head>
<title>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b> macro generates a comma-separated list of parameters with a default argument.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b>(<i>count</i>, <i>param</i>, <i>def</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>def</dt>
<dd>
The default value that trails each parameter.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>0</i> = <i>def</i>, <i>param</i> ## <i>1</i> = <i>def</i>, ... <i>param</i> ## <i>count</i> - <i>1</i> = <i>def</i>
</div>
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<div>
This macro is deprecated.&nbsp;
It only exists for backward compatibility.&nbsp;
Use <b>BOOST_PP_ENUM_BINARY_PARAMS</b> with <b>BOOST_PP_INTERCEPT</b> instead:
<div>
<b>BOOST_PP_ENUM_BINARY_PARAMS</b>(<i>count</i>, <i>param</i>, = <i>def</i> <b>BOOST_PP_INTERCEPT</b>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a></li>
<li><a href="intercept.html">BOOST_PP_INTERCEPT</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_params_with_a_default.hpp.html">&lt;boost/preprocessor/repetition/enum_params_with_a_default.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_params_with_a_default.hpp.html">boost/preprocessor/repetition/enum_params_with_a_default.hpp</a>&gt;
<a href="enum_params_with_a_default.html">BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a>(3, class T, int)
// expands to T0 = int, T1 = int, T2 = int
<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, class T, = int <a href="intercept.html">BOOST_PP_INTERCEPT</a>)
// expands to T0 = int, T1 = int, T2 = int
</pre></div>
</body>
</html>

View File

@ -0,0 +1,73 @@
<html>
<head>
<title>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b> macro generates a comma-separated list of parameters with default arguments.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b>(<i>count</i>, <i>param</i>, <i>def</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>def</dt>
<dd>
The default value that trails each parameter.
<b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate default arguments.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>0</i> = <i>def</i> ## <i>0</i>, <i>param</i> ## <i>1</i> = <i>def</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i> = <i>def</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<div>
This macro is deprecated.&nbsp;
It only exists for backward compatibility.&nbsp;
Use <b>BOOST_PP_ENUM_BINARY_PARAMS</b> instead:
<div>
<b>BOOST_PP_ENUM_BINARY_PARAMS</b>(<i>count</i>, <i>param</i>, = <i>def</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_params_with_defaults.hpp.html">&lt;boost/preprocessor/repetition/enum_params_with_defaults.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_params_with_defaults.hpp.html">boost/preprocessor/repetition/enum_params_with_defaults.hpp</a>&gt;
<a href="enum_params_with_defaults.html">BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a>(3, class T, U)
// expands to T0 = U0, T1 = U1, T2 = U2
<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, class T, = U)
// expands to T0 = U0, T1 = U1, T2 = U2
</pre></div>
</body>
</html>

View File

@ -0,0 +1,71 @@
<html>
<head>
<title>BOOST_PP_ENUM_PARAMS_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_PARAMS_Z</b> macro generates a comma-separated list of parameters.&nbsp;
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_PARAMS_Z</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>0</i>, <i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_params.html">BOOST_PP_ENUM_PARAMS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_params.hpp.html">&lt;boost/preprocessor/repetition/enum_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div id="sample"><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_params.hpp.html">boost/preprocessor/repetition/enum_params.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
#define MACRO(z, n, _) \
template&lt; \
<a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), class T) \
&gt; class X ## n { \
/* ... */ \
}; \
/**/
<a href="repeat.html">BOOST_PP_REPEAT</a>(2, MACRO, nil)
/*
expands to...
template&lt;class T0&gt; class X0 { };
template&lt;class T0, class T1&gt; class X1 { };
*/
</pre></div>
</body>
</html>

71
doc/ref/enum_shifted.html Normal file
View File

@ -0,0 +1,71 @@
<html>
<head>
<title>BOOST_PP_ENUM_SHIFTED</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_SHIFTED</b> macro generates a comma-separated, shifted list.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_SHIFTED</b>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM_SHIFTED</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
The <i>z</i> value that is passed to <i>macro</i> represents the next available repetition dimension.&nbsp;
Other macros that have <b>_Z</b> suffix variants internally use <b>BOOST_PP_REPEAT</b>--for example, <b>BOOST_PP_ENUM_PARAMS</b> and <b>BOOST_PP_ENUM_PARAMS_Z</b>.&nbsp;
Using these <b>_Z</b> versions is not strictly necessary, but passing the <i>z</i> value (that is passed to <i>macro</i>) to these macros allows them to reenter <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<div>
To directly use this <i>z</i> value, rather than simply passing it to another macro, see <b>BOOST_PP_ENUM_SHIFTED_<i>z</i></b>.
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_shifted_z.html">BOOST_PP_ENUM_SHIFTED_<i>z</i></a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_shifted.hpp.html">&lt;boost/preprocessor/repetition/enum_shifted.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum.hpp.html">boost/preprocessor/repetition/enum.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_shifted.hpp.html">boost/preprocessor/repetition/enum_shifted.hpp</a>&gt;
#define TYPE(z, n, type) type
<a href="enum.html">BOOST_PP_ENUM</a>(5, TYPE, int) // expands to int, int, int, int, int
<a href="enum_shifted.html">BOOST_PP_ENUM_SHIFTED</a>(5, TYPE, int) // expands to int, int, int, int
</pre></div>
</body>
</html>

View File

@ -0,0 +1,62 @@
<html>
<head>
<title>BOOST_PP_ENUM_SHIFTED_PARAMS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_SHIFTED_PARAMS</b> macro generates a comma-separated, shifted list of parameters.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_SHIFTED_PARAMS</b>(<i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_SHIFTED_PARAMS</b> concatenates numbers ranging from <i>1</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
This macro facilitates a typical usage of the library.&nbsp;
Shifted parameter lists are common in template metaprograms.
</div>
<div>
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</b>.
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
<li><a href="enum_shifted_params_z.html">BOOST_PP_SHIFTED_ENUM_PARAMS_<i>z</i></a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_shifted_params.hpp.html">&lt;boost/preprocessor/repetition/enum_shifted_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_shifted_params.hpp.html">boost/preprocessor/repetition/enum_shifted_params.hpp</a>&gt;
<a href="enum_shifted_params.html">BOOST_PP_ENUM_SHIFTED_PARAMS</a>(3, class T) // expands to class T1, class T2
</pre></div>
</body>
</html>

View File

@ -0,0 +1,68 @@
<html>
<head>
<title>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</b> macro generates a comma-separated, shifted list of parameters.&nbsp;
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</b> concatenates numbers ranging from <i>1</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
<i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
<li><a href="enum_shifted_params.html">BOOST_PP_ENUM_SHIFTED_PARAMS</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_shifted_params.hpp.html">&lt;boost/preprocessor/repetition/enum_shifted_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_params.hpp.html">boost/preprocessor/repetition/enum_params.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_shifted_params.hpp.html">boost/preprocessor/repetition/enum_shifted_params.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
int add(void) {
return 0;
}
#define ADD_F(z, n, _) \
int add_f(<a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), int p)) { \
return p0 + add_f(<a href="enum_shifted_params_z.html">BOOST_PP_ENUM_SHIFTED_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), p)); \
} \
/**/
<a href="repeat.html">BOOST_PP_REPEAT</a>(5, ADD_F, nil)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,82 @@
<html>
<head>
<title>BOOST_PP_ENUM_SHIFTED_z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_SHIFTED_<i>z</i></b> macro represents a reentry into the <b>BOOST_PP_ENUM_SHIFTED</b> repetition construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_SHIFTED_</b> ## <i>z</i>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM_SHIFTED</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the sequence:
<div>
<i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.&nbsp;
This happens when the <i>z</i> value is a macro invocation itself.&nbsp;
It needs a delay to allow it to expand.&nbsp;
The syntax in such a scenario becomes:
<div>
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_ENUM_SHIFTED_</b>, <i>z</i>)(<i>count</i>, <i>macro</i>, <i>data</i>).
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="cat.html">BOOST_PP_CAT</a></li>
<li><a href="enum_shifted.html">BOOST_PP_ENUM_SHIFTED</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_shifted.hpp.html">&lt;boost/preprocessor/repetition/enum_shifted.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_shifted.hpp.html">boost/preprocessor/repetition/enum_shifted.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
#define TEXT(z, n, text) text
#define MACRO(z, n, data) \
( \
<a href="enum_shifted_z.html">BOOST_PP_ENUM_SHIFTED_</a> ## z( \
BOOST_PP_INC(n), \
TEXT, data \
) \
) \
/**/
<a href="repeat.html">BOOST_PP_REPEAT</a>(3, MACRO, class) // expands to () (class) (class, class)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING</b> macro generates a comma-separated list with a leading comma.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING</b>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
, <i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>), <i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
The <i>z</i> value that is passed to <i>macro</i> represents the next available repetition dimension.&nbsp;
Other macros that have <b>_Z</b> suffix variants internally use <b>BOOST_PP_REPEAT</b>--for example, <b>BOOST_PP_ENUM_PARAMS</b> and <b>BOOST_PP_ENUM_PARAMS_Z</b>.&nbsp;
Using these <b>_Z</b> versions is not strictly necessary, but passing the <i>z</i> value (that is passed to <i>macro</i>) to these macros allows them to reenter <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<div>
To directly use this <i>z</i> value, rather than simply passing it to another macro, see <b>BOOST_PP_ENUM_TRAILING_<i>z</i></b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_trailing_z.html">BOOST_PP_ENUM_TRAILING_<i>z</i></a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_trailing.hpp.html">boost/preprocessor/repetition/enum_trailing.hpp</a>&gt;
#define TEXT(z, n, text) text
template&lt;class <a href="enum_trailing.html">BOOST_PP_ENUM_TRAILING</a>(3, TEXT, class)&gt;
class X { };
/*
expands to...
template&lt;class, class, class, class&gt;
class X { };
*/
</pre></div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</b> macro generates a comma-separated list of binary parameters with a leading comma.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</b>(<i>count</i>, <i>p1</i>, <i>p2</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>p1</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>p2</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
, <i>p1</i> ## <i>0</i> <i>p2</i> ## <i>0</i>, <i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_trailing_binary_params_z.html">BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing_binary_params.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing_binary_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/facilities/intercept.hpp.html">boost/preprocessor/facilities/intercept.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_trailing_binary_params.hpp.html">boost/preprocessor/repetition/enum_trailing_binary_params.hpp</a>&gt;
template&lt;class X <a href="enum_trailing_binary_params.html">BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</a>(4, class A, = X <a href="intercept.html">BOOST_PP_INTERCEPT</a>)&gt;
struct sample {
// ...
};
/* expands to...
template&lt;class X, class A0 = X, class A1 = X, class A2 = X, class A3 = X&gt;
struct sample {
// ...
}
*/
</pre></div>
</body>
</html>

View File

@ -0,0 +1,56 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</b> macro generates a comma-separated list of binary parameters with a leading comma.&nbsp;
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>p1</i>, <i>p2</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>p1</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
<dt>p2</dt>
<dd>
The text of the first part of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
, <i>p1</i> ## <i>0</i> <i>p2</i> ## <i>0</i>, <i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_trailing_binary_params.html">BOOST_PP_ENUM_TRAILING_BINARY_PARAMS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing_binary_params.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing_binary_params.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING_PARAMS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING_PARAMS</b> macro generates a comma-separated list of parameters with a leading comma.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING_PARAMS</b>(<i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
, <i>param</i> ## <i>0</i>, <i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<div>
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_TRAILING_PARAMS_Z</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_trailing_params_z.html">BOOST_PP_ENUM_TRAILING_PARAMS_Z</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing_params.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum_trailing_params.hpp.html">boost/preprocessor/repetition/enum_trailing_params.hpp</a>&gt;
class X <a href="enum_trailing_params.html">BOOST_PP_ENUM_TRAILING_PARAMS</a>(2, class T)
// expands to class X, class T0, class T1, class T2
</pre></div>
</body>
</html>

View File

@ -0,0 +1,70 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING_PARAMS_Z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING_PARAMS_Z</b> macro generates a comma-separated list of parameters with a leading comma.&nbsp;
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>param</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of parameters to generate.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>param</dt>
<dd>
The text of the parameter.&nbsp;
<b>BOOST_PP_ENUM_TRAILING_PARAMS_Z</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
to generate parameters.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the comma-separated sequence:
<div>
, <i>param</i> ## <i>0</i>, <i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="enum_trailing_params.html">BOOST_PP_ENUM_TRAILING_PARAMS</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing_params.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing_params.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div id="sample"><pre>
#include &lt;<a href="../headers/repetition/enum_trailing_params.hpp.html">boost/preprocessor/repetition/enum_trailing_params.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/repeat.hpp.html">boost/preprocessor/repetition/repeat.hpp</a>&gt;
#define MACRO(z, n, _) \
template&lt; \
class <a href="enum_trailing_params_z.html">BOOST_PP_ENUM_TRAILING_PARAMS_Z</a>(z, n, class T) \
&gt; class X ## n { \
/* ... */ \
}; \
/**/
<a href="repeat.html">BOOST_PP_REPEAT</a>(2, MACRO, nil)
/*
expands to...
template&lt;class&gt; class X0 { };
template&lt;class, class T0&gt; class X1 { };
*/
</pre></div>
</body>
</html>

View File

@ -0,0 +1,85 @@
<html>
<head>
<title>BOOST_PP_ENUM_TRAILING_z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_TRAILING_<i>z</i></b> macro represents a reentry into the <b>BOOST_PP_ENUM_TRAILING</b> repetition construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_TRAILING_</b> ## <i>z</i>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the sequence:
<div>
, <i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>), <i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.&nbsp;
This happens when the <i>z</i> value is a macro invocation itself.&nbsp;
It needs a delay to allow it to expand.&nbsp;
The syntax in such a scenario becomes:
<div>
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_ENUM_TRAILING_</b>, <i>z</i>)(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="cat.html">BOOST_PP_CAT</a></li>
<li><a href="enum_trailing.html">BOOST_PP_ENUM_TRAILING</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_trailing.hpp.html">&lt;boost/preprocessor/repetition/enum_trailing.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/repetition/enum.hpp.html">boost/preprocessor/repetition/enum.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_trailing.hpp.html">boost/preprocessor/repetition/enum_trailing.hpp</a>&gt;
#define TEXT(z, n, text) text
#define TTP(z, n, _) \
template&lt; \
class <a href="enum_z.html">BOOST_PP_ENUM_TRAILING_</a> ## z(n, TEXT, class) \
&gt; \
class T ## n \
/**/
<a href="enum.html">BOOST_PP_ENUM</a>(3, TTP, nil)
/*
expands to...
template&lt;class&gt; class T0,
template&lt;class, class&gt; class T1,
template&lt;class, class, class&gt; class T2
*/
</pre></div>
</body>
</html>

85
doc/ref/enum_z.html Normal file
View File

@ -0,0 +1,85 @@
<html>
<head>
<title>BOOST_PP_ENUM_z</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ENUM_<i>z</i></b> macro represents a reentry into the <b>BOOST_PP_ENUM</b> repetition construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ENUM_</b> ## <i>z</i>(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>z</dt>
<dd>
The next available <b>BOOST_PP_REPEAT</b> dimension.
</dd>
<dt>count</dt>
<dd>
The number of repetitious calls to <i>macro</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
</dd>
<dt>macro</dt>
<dd>
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_ENUM</b> with the next available repetition depth,
the current repetition number, and the auxiliary <i>data</i> argument.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the sequence:
<div>
<i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>), <i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>), ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
</div>
</div>
<div>
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.&nbsp;
This happens when the <i>z</i> value is a macro invocation itself.&nbsp;
It needs a delay to allow it to expand.&nbsp;
The syntax in such a scenario becomes:
<div>
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_ENUM_</b>, <i>z</i>)(<i>count</i>, <i>macro</i>, <i>data</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="cat.html">BOOST_PP_CAT</a></li>
<li><a href="enum.html">BOOST_PP_ENUM</a></li>
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/enum.hpp.html">&lt;boost/preprocessor/repetition/enum.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum.hpp.html">boost/preprocessor/repetition/enum.hpp</a>&gt;
#define TEXT(z, n, text) text
#define TTP(z, n, _) \
template&lt; \
<a href="enum_z.html">BOOST_PP_ENUM_</a> ## z(<a href="inc.html">BOOST_PP_INC</a>(n), TEXT, class) \
&gt; \
class T ## n \
/**/
<a href="enum.html">BOOST_PP_ENUM</a>(3, TTP, nil)
/*
expands to...
template&lt;class&gt; class T0,
template&lt;class, class&gt; class T1,
template&lt;class, class, class&gt; class T2
*/
</pre></div>
</body>
</html>

53
doc/ref/equal.html Normal file
View File

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_EQUAL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EQUAL</b> macro compares two values for equality.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EQUAL</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction because this macro no longer uses <b>BOOST_PP_WHILE</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="equal_d.html">BOOST_PP_EQUAL_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/equal.hpp.html">&lt;boost/preprocessor/comparison/equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/equal.hpp.html">boost/preprocessor/comparison/equal.hpp</a>&gt;
<a href="equal.html">BOOST_PP_EQUAL</a>(4, 3) // expands to 0
<a href="equal.html">BOOST_PP_EQUAL</a>(5, 5) // expands to 1
</pre></div>
</body>
</html>

58
doc/ref/equal_d.html Normal file
View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_EQUAL_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EQUAL_D</b> macro compares two values for equality.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EQUAL_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
This argument is ignored.
</dd>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
This macro is deprecated.&nbsp;
It only exists for backward compatibility.&nbsp;
Use <b>BOOST_PP_EQUAL</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="equal.html">BOOST_PP_EQUAL</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/equal.hpp.html">&lt;boost/preprocessor/comparison/equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/equal.hpp.html">boost/preprocessor/comparison/equal.hpp</a>&gt;
<a href="equal_d.html">BOOST_PP_EQUAL_D</a>(1, 4, 3) // expands to 0
<a href="equal_d.html">BOOST_PP_EQUAL_D</a>(1, 5, 5) // expands to 1
</pre></div>
</body>
</html>

56
doc/ref/expand.html Normal file
View File

@ -0,0 +1,56 @@
<html>
<head>
<title>BOOST_PP_EXPAND</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EXPAND</b> macro performs a double macro-expansion on its argument.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EXPAND</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The argument to be expanded twice.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is useful when a delay is necessary to produce the correct semantics of a macro invocation.&nbsp;
For example, when a macro expands to an argument list to another macro.&nbsp;
This macro will expand the the argument list on the first pass, and then rescan to expand any more macros.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/facilities/expand.hpp.html">&lt;boost/preprocessor/facilities/expand.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/if.hpp.html">boost/preprocessor/control/if.hpp</a>&gt;
#include &lt;<a href="../headers/facilities/expand.hpp.html">boost/preprocessor/facilities/expand.hpp</a>&gt;
#define MACRO(a, b, c) (a)(b)(c)
#define ARGS() (1, 2, 3)
<a href="expand.html">BOOST_PP_EXPAND</a>(MACRO ARGS) // expands to (1)(2)(3)
#define SAMPLE(n) \
<a href="expand.html">BOOST_PP_EXPAND</a>( \
MACRO, \
<a href="if.html">BOOST_PP_IF</a>( \
n, \
(x, y, z), \
(a, b, c) \
) \
) \
/**/
SAMPLE(0) // expands to (a)(b)(c)
SAMPLE(1) // expands to (x)(y)(z)
</pre></div>
</body>
</html>

59
doc/ref/expr_if.html Normal file
View File

@ -0,0 +1,59 @@
<html>
<head>
<title>BOOST_PP_EXPR_IF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EXPR_IF</b> macro expands to its second argument if its first argument is non-zero or expands to nothing otherwise.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EXPR_IF</b>(<i>cond</i>, <i>expr</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>cond</dt>
<dd>
The condition that determines if the result is <i>expr</i> or nothing.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>expr</dt>
<dd>
The result of the expansion if <i>cond</i> is non-zero.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro performs a boolean conversion on its first argument.&nbsp;
If that conversion is unnecessary, use <b>BOOST_PP_EXPR_IIF</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="expr_iif.html">BOOST_PP_EXPR_IIF</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/control/expr_if.hpp.html">&lt;boost/preprocessor/control/expr_if.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/expr_if.hpp.html">boost/preprocessor/control/expr_if.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define CV(n) \
<a href="expr_if.html">BOOST_PP_EXPR_IF</a>( \
n, \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>( \
4, n, \
(..., const, volatile, const volatile) \
) \
) \
/**/
CV(0) // expands to nothing
CV(1) // expands to const
</pre></div>
</body>
</html>

56
doc/ref/expr_iif.html Normal file
View File

@ -0,0 +1,56 @@
<html>
<head>
<title>BOOST_PP_EXPR_IIF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_EXPR_IIF</b> macro expands to its second argument if its first argument is <i>1</i> and expands to nothing if its first argument is <i>0</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_EXPR_IIF</b>(<i>bit</i>, <i>expr</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>bit</dt>
<dd>
The condition that determines if the result is <i>expr</i> or nothing.&nbsp;
This value must expand to <i>0</i> or </i>1</i>.
</dd>
<dt>expr</dt>
<dd>
The result of the expansion if <i>bit</i> is <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro <i>does not</i> perform a boolean conversion on its first argument.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_EXPR_IF</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="expr_if.html">BOOST_PP_EXPR_IF</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/control/expr_iif.hpp.html">&lt;boost/preprocessor/control/expr_iif.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/and.hpp.html">boost/preprocessor/comparison/and.hpp</a>&gt;
#include &lt;<a href="../headers/control/expr_iif.hpp">boost/preprocessor/control/expr_iif.hpp</a>&gt;
#define INSERT_AND(p, q, text) \
<a href="expr_iif.html">BOOST_PP_EXPR_IIF</a>( \
<a href="and.html">BOOST_PP_AND</a>(p, q), \
text \
) \
/**/
INSERT_AND(2, 3, abc) // expands to abc
INSERT_AND(0, 7, xyz) // expands to nothing
</pre></div>
</body>
</html>

41
doc/ref/filename_x.html Normal file
View File

@ -0,0 +1,41 @@
<html>
<head>
<title>BOOST_PP_FILENAME_x</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FILENAME_<i>x</i></b> macro is a user-defined <i>named external argument</i> used by <b>BOOST_PP_ITERATE</b>.&nbsp;
It denotes the file to be iterated over.
</div>
<h4>Usage</h4>
<div class="code">
#define <b>BOOST_PP_FILENAME_<i>x</i></b> <i>filename</i>
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The iteration depth of the next <i>file-iteration</i>.&nbsp;
This value <i>must</i> be the current iteration depth + <i>1</i>.
</dd>
<dt>filename</dt>
<dd>
A quoted or angle-bracketed filename to used as the target of a <i>file-iteration</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is part of the secondary method of passing arguments to <b>BOOST_PP_ITERATE</b>.&nbsp;
The other part is <b>BOOST_PP_ITERATION_LIMITS</b>.
</div>
<div>
This macro is automatically undefined for reuse by a call to <b>BOOST_PP_ITERATE</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="iterate.html">BOOST_PP_ITERATE</a></li>
<li><a href="iteration_limits.html">BOOST_PP_ITERATION_LIMITS</a></li>
</ul>
</body>
</html>

94
doc/ref/for.html Normal file
View File

@ -0,0 +1,94 @@
<html>
<head>
<title>BOOST_PP_FOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FOR</b> macro represents a generalized horizontal repetition construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FOR</b>(<i>state</i>, <i>pred</i>, <i>op</i>, <i>macro</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>state</dt>
<dd>
The initial state.
</dd>
<dt>pred</dt>
<dd>
A binary predicate of the form <i>pred</i>(<i>r</i>, <i>state</i>).&nbsp;
This macro must expand to an integer in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.&nbsp;
<b>BOOST_PP_FOR</b> repeatedly expands <i>macro</i> while this predicate returns non-zero.&nbsp;
This macro is called with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
</dd>
<dt>op</dt>
<dd>
A binary operation of the form <i>op</i>(<i>r</i>, <i>state</i>).&nbsp;
This operation is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.&nbsp;
This macro is repeatedly applied to the <i>state</i>, each time producing a new <i>state</i>, until <i>pred</i> returns <i>0</i>.
</dd>
<dt>macro</dt>
<dd>
A binary macro of the form <i>macro</i>(<i>r</i>, <i>state</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.&nbsp;
This macro is is repeated by <b>BOOST_PP_FOR</b> until <i>pred</i> returns <i>0</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>state</i>) <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, <i>state</i>)) ... <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, ... <i>op</i>(<i>r</i>, <i>state</i>) ... ))
</div>
</div>
<div>
The <i>r</i> value that is passed to <i>pred</i>, <i>op</i>, and <i>macro</i> represents the next available <b>BOOST_PP_FOR</b> repetition.&nbsp;
Other macros that have <b>_R</b> suffix variants internally use <b>BOOST_PP_FOR</b>--for example, <b>BOOST_PP_LIST_FOR_EACH</b> and <b>BOOST_PP_LIST_FOR_EACH_R</b>.&nbsp;
Using these <b>_R</b> versions is not strictly necessary, but passing the <i>r</i> value (that is passed to <i>pred</i>, <i>op</i>, and <i>macro</i>) to these macros allows them to reenter <b>BOOST_PP_FOR</b> with maximum efficiency.
</div>
<div>
To directly use this <i>r</i> value, rather than simply passing it to another macro, see <b>BOOST_PP_FOR_<i>r</i></b>.
</div>
<div>
Previously, this macro could not be used recursively inside <b>BOOST_PP_FOR</b>.&nbsp;
This limitation no longer exists, as the library can automatically detect the next available <b>BOOST_PP_FOR</b> repetition.
</div>
<h4>See Also</h4>
<ul>
<li><a href="for_r.html">BOOST_PP_FOR_<i>r</i></a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/for.hpp.html">&lt;boost/preprocessor/repetition/for.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/comparison/not_equal.hpp.html">boost/preprocessor/comparison/not_equal.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/for.hpp.html">boost/preprocessor/repetition/for.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define PRED(r, state) \
<a href="not_equal.html">BOOST_PP_NOT_EQUAL</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, state), \
<a href="inc.html">BOOST_PP_INC</a>(<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, state)) \
) \
/**/
#define OP(r, state) \
( \
<a href="inc.html">BOOST_PP_INC</a>(<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, state)), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 1, state) \
) \
/**/
#define MACRO(r, state) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(2, 0, state)
<a href="for.html">BOOST_PP_FOR</a>((5, 10), PRED, OP, MACRO) // expands to 5 6 7 8 9 10
</pre></div>
</body>
</html>

144
doc/ref/for_r.html Normal file
View File

@ -0,0 +1,144 @@
<html>
<head>
<title>BOOST_PP_FOR_r</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FOR_<i>r</i></b> macro represents a reentry into the <b>BOOST_PP_FOR</b> repetition construct.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FOR_</b> ## <i>r</i>(<i>state</i>, <i>pred</i>, <i>op</i>, <i>macro</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>r</dt>
<dd>
The next available <b>BOOST_PP_FOR</b> repetition.
</dd>
<dt>state</dt>
<dd>
The initial state.
</dd>
<dt>pred</dt>
<dd>
A binary predicate of the form <i>pred</i>(<i>r</i>, <i>state</i>).&nbsp;
This macro must expand to an integer in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.&nbsp;
<b>BOOST_PP_FOR</b> repeatedly expands <i>macro</i> while this predicate returns non-zero.&nbsp;
This macro is called with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
</dd>
<dt>op</dt>
<dd>
A binary operation of the form <i>op</i>(<i>r</i>, <i>state</i>).&nbsp;
This operation is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.&nbsp;
This macro is repeatedly applied to the <i>state</i>, each time producing a new <i>state</i>, until <i>pred</i> returns <i>0</i>.
</dd>
<dt>macro</dt>
<dd>
A binary macro of the form <i>macro</i>(<i>r</i>, <i>state</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.&nbsp;
This macro is is repeated by <b>BOOST_PP_FOR</b> until <i>pred</i> returns <i>0</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>state</i>) <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, <i>state</i>)) ... <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, ... <i>op</i>(<i>r</i>, <i>state</i>) ... ))
</div>
</div>
<div>
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.&nbsp;
This happens when the <i>r</i> value is a macro invocation itself.&nbsp;
It needs a delay to allow it to expand.&nbsp;
The syntax in such a scenario becomes:
<div>
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_FOR_</b>, <i>r</i>)(<i>state</i>, <i>pred</i>, <i>op</i>, <i>macro</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="cat.html">BOOST_PP_CAT</a></li>
<li><a href="for.html">BOOST_PP_FOR</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/repetition/for.hpp.html">&lt;boost/preprocessor/repetition/for.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
#include &lt;<a href="../headers/comparison/not_equal.hpp.html">boost/preprocessor/comparison/not_equal.hpp</a>&gt;
#include &lt;<a href="../headers/punctuation/comma_if.hpp.html">boost/preprocessor/punctuation/comma_if.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/for.hpp.html">boost/preprocessor/repetition/for.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define PRED(r, state) \
<a href="not_equal.html">BOOST_PP_NOT_EQUAL</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state), \
<a href="inc.html">BOOST_PP_INC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 1, state) \
) \
) \
/**/
#define OP(r, state) \
( \
<a href="inc.html">BOOST_PP_INC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state) \
), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 1, state), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 2, state), \
<a href="inc.html">BOOST_PP_INC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 3, state) \
) \
) \
/**/
#define MACRO(r, state) \
<a href="comma_if.html">BOOST_PP_COMMA_IF</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 3, state) \
) template&lt; \
<a href="for_r.html">BOOST_PP_FOR_</a> ## r( \
(0, <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state), _, 0), \
PRED_2, OP, MACRO_2 \
) \
&gt; class <a href="cat.html">BOOST_PP_CAT</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 2, state), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state) \
) \
/**/
#define PRED_2(r, state) \
<a href="not_equal.html">BOOST_PP_NOT_EQUAL</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 1, state) \
) \
/**/
#define MACRO_2(r, state) \
<a href="comma_if.html">BOOST_PP_COMMA_IF</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, state) \
) class \
/**/
#define TEMPLATE_TEMPLATE(low, high, name) \
<a href="for.html">BOOST_PP_FOR</a>( \
(low, high, name, 0), \
PRED, OP, MACRO \
) \
/**/
TEMPLATE_TEMPLATE(2, 4, T)
/*
expands to...
template&lt;class, class&gt; class T2,
template&lt;class, class, class&gt; class T3,
template&lt;class, class, class, class&gt; class T4
*/
</pre></div>
</body>
</html>

31
doc/ref/frame_finish.html Normal file
View File

@ -0,0 +1,31 @@
<html>
<head>
<title>BOOST_PP_FRAME_FINISH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FRAME_FINISH</b> macro expands to the upper bound of an absolute <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FRAME_FINISH</b>(<i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The absolute depth of the frame whose upper bound is to be retreived.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
</body>
</html>

31
doc/ref/frame_flags.html Normal file
View File

@ -0,0 +1,31 @@
<html>
<head>
<title>BOOST_PP_FRAME_FLAGS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FRAME_FLAGS</b> macro expands to the flags associated with an absolute <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FRAME_FLAGS</b>(<i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The absolute depth of the frame whose flags are to be retreived.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,62 @@
<html>
<head>
<title>BOOST_PP_FRAME_ITERATION</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FRAME_ITERATION</b> macro expands to the iteration value of an absolute <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FRAME_ITERATION</b>(<i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The absolute depth of the frame whose iteration value is to be retreived.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 10, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
--
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_2</a> \
(3, (1, <a href="iteration.html">BOOST_PP_ITERATION</a>(), "file.h")) \
/**/
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#else
outer: <a href="frame_iteration.html">BOOST_PP_FRAME_ITERATION</a>(1)
inner: <a href="frame_iteration.html">BOOST_PP_FRAME_ITERATION</a>(2)
#endif
</pre></div>
</body>
</html>

31
doc/ref/frame_start.html Normal file
View File

@ -0,0 +1,31 @@
<html>
<head>
<title>BOOST_PP_FRAME_START</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_FRAME_START</b> macro expands to the lower bound of an absolute <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_FRAME_START</b>(<i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The absolute depth of the frame whose lower bound is to be retreived.&nbsp;
Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
</body>
</html>

54
doc/ref/greater.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_GREATER</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_GREATER</b> macro compares two values for greater magnitude.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_GREATER</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is greater than <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_GREATER_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="greater_d.html">BOOST_PP_GREATER_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/greater.hpp.html">&lt;boost/preprocessor/comparison/greater.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/greater.hpp.html">boost/preprocessor/comparison/greater.hpp</a>&gt;
<a href="greater.html">BOOST_PP_GREATER</a>(4, 3) // expands to 1
<a href="greater.html">BOOST_PP_GREATER</a>(5, 5) // expands to 0
</pre></div>
</body>
</html>

58
doc/ref/greater_d.html Normal file
View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_GREATER_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_GREATER_D</b> macro compares two values for greater magnitude.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_GREATER_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is greater than <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="greater.html">BOOST_PP_GREATER</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/greater.hpp.html">&lt;boost/preprocessor/comparison/greater.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/greater.hpp.html">boost/preprocessor/comparison/greater.hpp</a>&gt;
#include &lt;<a href="../headers/list/filter.hpp.html">boost/preprocessor/list/filter.hpp</a>&gt;
#define LIST (1, (2, (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))))
#define PRED(d, _, num) <a href="greater_d.html">BOOST_PP_GREATER_D</a>(d, num, 2)
<a href="list_filter.html">BOOST_PP_LIST_FILTER</a>(PRED, nil, LIST) // expands to (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))
</pre></div>
</body>
</html>

View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_GREATER_EQUAL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_GREATER_EQUAL</b> macro compares two values for equality or greater magnitude.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_GREATER_EQUAL</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is greater than or equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_GREATER_EQUAL_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="greater_equal_d.html">BOOST_PP_GREATER_EQUAL_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/greater_equal.hpp.html">&lt;boost/preprocessor/comparison/greater_equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/greater_equal.hpp.html">boost/preprocessor/comparison/greater_equal.hpp</a>&gt;
<a href="greater_equal.html">BOOST_PP_GREATER_EQUAL</a>(4, 3) // expands to 1
<a href="greater_equal.html">BOOST_PP_GREATER_EQUAL</a>(5, 5) // expands to 1
</pre></div>
</body>
</html>

View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_GREATER_EQUAL_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_GREATER_EQUAL_D</b> macro compares two values for equality or greater magnitude.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_GREATER_EQUAL_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is greater than or equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="greater_equal.html">BOOST_PP_GREATER_EQUAL</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/greater_equal.hpp.html">&lt;boost/preprocessor/comparison/greater_equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/greater_equal.hpp.html">boost/preprocessor/comparison/greater_equal.hpp</a>&gt;
#include &lt;<a href="../headers/list/filter.hpp.html">boost/preprocessor/list/filter.hpp</a>&gt;
#define LIST (1, (2, (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))))
#define PRED(d, _, num) <a href="greater_equal_d.html">BOOST_PP_GREATER_EQUAL_D</a>(d, num, 4)
<a href="list_filter.html">BOOST_PP_LIST_FILTER</a>(PRED, nil, LIST) // expands to (4, (5, <a href="nil.html">BOOST_PP_NIL</a>))
</pre></div>
</body>
</html>

46
doc/ref/identity.html Normal file
View File

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_IDENTITY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_IDENTITY</b> macro expands to its argument when invoked.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_IDENTITY</b>(<i>item</i>)()
</div>
<h4>Arguments</h4>
<dl>
<dt>item</dt>
<dd>
The result of the expansion.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is designed to be used with <b>BOOST_PP_IF</b> and <b>BOOST_PP_IIF</b> when only one of the clauses needs to be invoked.
</div>
<h4>See Also</h4>
<ul>
<li><a href="if.html">BOOST_PP_IF</a></li>
<li><a href="iif.html">BOOST_PP_IIF</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/facilities/identity.hpp.html">&lt;boost/preprocessor/facilities/identity.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/if.hpp.html">boost/preprocessor/control/if.hpp</a>&gt;
#include &lt;<a href="../headers/facilities/empty.hpp.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
#include &lt;<a href="../headers/facilities/identity.hpp.html">boost/preprocessor/facilities/identity.hpp</a>&gt;
#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, <a href="identity.html">BOOST_PP_IDENTITY</a>(x), <a href="empty.html">BOOST_PP_EMPTY</a>)()
MACRO(0) // expands to nothing
MACRO(1) // expands to x
</pre></div>
</body>
</html>

52
doc/ref/if.html Normal file
View File

@ -0,0 +1,52 @@
<html>
<head>
<title>BOOST_PP_IF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_IF</b> macro chooses between to values based on a logical condition.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_IF</b>(<i>cond</i>, <i>t</i>, <i>f</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>cond</dt>
<dd>
The condition that determines if the result is <i>expr</i> or nothing.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>t</dt>
<dd>
The result of the expansion if <i>cond</i> is non-zero.
</dd>
<dt>f</dt>
<dd>
The result of the expansion if <i>cond</i> is <i>0</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro performs a boolean conversion on its first argument.&nbsp;
If that conversion is unnecessary, use <b>BOOST_PP_IIF</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="iif.html">BOOST_PP_IIF</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/control/if.hpp.html">&lt;boost/preprocessor/control/if.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/if.hpp.html">boost/preprocessor/control/if.hpp</a>&gt;
<a href="if.html">BOOST_PP_IF</a>(10, a, b) // expands to a
<a href="if.html">BOOST_PP_IF</a>(0, a, b) // expands to b
</pre></div>
</body>
</html>

54
doc/ref/iif.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_IIF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_IIF</b> macro chooses between to values based on a bitwise condition.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_IIF</b>(<i>bit</i>, <i>t</i>, <i>f</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>bit</dt>
<dd>
The condition that determines if the result is <i>expr</i> or nothing.&nbsp;
This value must expand to <i>0</i> or <i>1</i>.
</dd>
<dt>t</dt>
<dd>
The result of the expansion if <i>bit</i> is <i>1</i>.
</dd>
<dt>f</dt>
<dd>
The result of the expansion if <i>bit</i> is <i>0</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro <i>does not</i> perform a boolean conversion on its first argument.&nbsp;
If that conversion is necessary, use <b>BOOST_PP_IF</b> instead.
</div>
<h4>See Also</h4>
<ul>
<li><a href="if.html">BOOST_PP_IF</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/control/iif.hpp.html">&lt;boost/preprocessor/control/iif.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/iif.hpp.html">boost/preprocessor/control/iif.hpp</a>&gt;
#define OR_IF(p, q, t, f) <a href="iif.html">BOOST_PP_IIF</a>(<a href="or.html">BOOST_PP_OR</a>(p, q), t, f)
OR_IF(1, 0, abc, xyz) // expands to abc
OF_IF(0, 0, abc, xyz) // expands to xyz
</pre></div>
</body>
</html>

43
doc/ref/inc.html Normal file
View File

@ -0,0 +1,43 @@
<html>
<head>
<title>BOOST_PP_INC</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_INC</b> macro expands to one more than its argument.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_INC</b>(<i>x</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The value to be incremented.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is <b>BOOST_PP_LIMIT_MAG</b>, the result is saturated to <b>BOOST_PP_LIMIT_MAG</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="dec.html">BOOST_PP_DEC</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/arithmetic/inc.hpp.html">&lt;boost/preprocessor/arithmetic/inc.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/inc.hpp.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
<a href="inc.html">BOOST_PP_INC</a>(<a href="inc.html">BOOST_PP_INC</a>(6)) // expands to 8
<a href="inc.html">BOOST_PP_INC</a>(4) // expands to 5
</pre></div>
</body>
</html>

90
doc/ref/include_self.html Normal file
View File

@ -0,0 +1,90 @@
<html>
<head>
<title>BOOST_PP_INCLUDE_SELF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_INCLUDE_SELF</b> macro includes a file indirectly.
</div>
<h4>Usage</h4>
<div class="code">
#include <b>BOOST_PP_INCLUDE_SELF</b>()
</div>
<h4>Arguments</h4>
<dl>
<dt>filename</dt>
<dd>
A quoted or angle-bracketed filename to be included by <b>BOOST_PP_INCLUDE_SELF</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
<b>BOOST_PP_INDIRECT_SELF</b> must be defined prior to using this macro.
</div>
<div>
Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.&nbsp;
This macro, in combination with <b>BOOST_PP_INDIRECT_SELF</b> allows a file to include itself indirectly.
</div>
<div>
While <b>BOOST_PP_INDIRECT_SELF</b> is being included, <b>BOOST_PP_INCLUDE_SELF</b> defines the macro <b>BOOST_PP_IS_SELFISH</b> to <i>1</i>.&nbsp;
When it returns from the inclusion, <b>BOOST_PP_IS_SELFISH</b> is undefined.
</div>
<h4>See Also</h4>
<ul>
<li><a href="indirect_self.html">BOOST_PP_INDIRECT_SELF</a></li>
<li><a href="is_selfish.html">BOOST_PP_IS_SELFISH</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/self.hpp.html">&lt;boost/preprocessor/iteration/self.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_selfish.html">BOOST_PP_IS_SELFISH</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/self.hpp.html">boost/preprocessor/iteration/self.hpp</a>&gt;
#define NAME X
struct NAME {
// ...
#define <a href="indirect_self.html">BOOST_PP_INDIRECT_SELF</a> "file.h"
#include <a href="include_self.html">BOOST_PP_INCLUDE_SELF</a>()
};
#define NAME Y
struct NAME {
// ...
#define <a href="indirect_self.html">BOOST_PP_INDIRECT_SELF</a> "file.h"
#include <a href="include_self.html">BOOST_PP_INCLUDE_SELF</a>()
};
#define NAME Z
struct NAME {
// ...
#define <a href="indirect_self.html">BOOST_PP_INDIRECT_SELF</a> "file.h"
#include <a href="include_self.html">BOOST_PP_INCLUDE_SELF</a>()
};
#endif
#else
inline bool validate(NAME* p) {
return true;
}
template&lt;class T&gt; bool validate(T* p) {
return dynamic_cast&lt;NAME*&gt;(p);
}
#undef NAME
#endif
</pre></div>
</body>
</html>

View File

@ -0,0 +1,34 @@
<html>
<head>
<title>BOOST_PP_INDIRECT_SELF</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_INDIRECT_SELF</b> macro is a user-defined <i>named external argument</i> used by <b>BOOST_PP_INCLUDE_SELF</b>.&nbsp;
</div>
<h4>Usage</h4>
<div class="code">
#define <b>BOOST_PP_INDIRECT_SELF</b> <i>filename</i>
</div>
<h4>Arguments</h4>
<dl>
<dt>filename</dt>
<dd>
A quoted or angle-bracketed filename to be included by <b>BOOST_PP_INCLUDE_SELF</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Most preprocessors will not allow a file to directly include itself--even when the file protects itself from such a scenario.&nbsp;
This macro, in combination with <b>BOOST_PP_INCLUDE_SELF</b> allows a file to include itself indirectly.
</div>
<div>
This macro is automatically undefined for reuse by a call to <b>BOOST_PP_INCLUDE_SELF</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="include_self.html">BOOST_PP_INCLUDE_SELF</a></li>
</ul>
</body>
</html>

40
doc/ref/intercept.html Normal file
View File

@ -0,0 +1,40 @@
<html>
<head>
<title>BOOST_PP_INTERCEPT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_INTERCEPT</b> macro intercepts a numeric concatenation and expands to nothing.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_INTERCEPT</b>
</div>
<h4>Remarks</h4>
<div>
This macro is used to intercept concatenations performed by various other library constructs.&nbsp;
It is typically used after other text to prevent eat the concatenation expand to nothing.&nbsp;
This macro can only intercept integer constants in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/facilities/intercept.hpp.html">&lt;boost/preprocessor/facilities/intercept.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/facilities/intercept.hpp.html">boost/preprocessor/facilities/intercept.hpp</a>&gt;
#include &lt;<a href="../headers/repetition/enum_binary_params.hpp.html">boost/preprocessor/repetition/enum_binary_params.hpp</a>&gt;
<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, class T, = U)
// expands to class T0 = U0, class T1 = U1, class T2 = U2
<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, class T, = int <a href="intercept.html">BOOST_PP_INTERCEPT</a>)
// expands to class T0 = int, class T1 = int, class T2 = int
</pre></div>
</body>
</html>

27
doc/ref/is_iterating.html Normal file
View File

@ -0,0 +1,27 @@
<html>
<head>
<title>BOOST_PP_IS_ITERATING</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_IS_ITERATING</b> macro is defined when a <i>file-iteration</i> is in progress.
</div>
<h4>Usage</h4>
<div class="code">
#if !defined(<b>BOOST_PP_IS_ITERATING</b>) // ...
</div>
<h4>Remarks</h4>
<div>
If a <i>file-iteration</i> is in progress, this macro is defined as <i>1</i>.&nbsp;
This means that the following will also work:
<div>
#if !<b>BOOST_PP_IS_ITERATING</b> // ...
</div>
</div>
<div>
This macro is defined to guard a file from infinite inclusion.
</div>
</body>
</html>

27
doc/ref/is_selfish.html Normal file
View File

@ -0,0 +1,27 @@
<html>
<head>
<title>BOOST_PP_IS_SELFISH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_IS_SELFISH</b> macro is defined when a <i>self-inclusion</i> is in progress.
</div>
<h4>Usage</h4>
<div class="code">
#if !defined(<b>BOOST_PP_IS_SELFISH</b>) // ...
</div>
<h4>Remarks</h4>
<div>
If a <i>self-inclusion</i> is in progress, this macro is defined as <i>1</i>.&nbsp;
This means that the following will also work:
<div>
#if !<b>BOOST_PP_IS_SELFISH</b> // ...
</div>
</div>
<div>
This macro is defined to guard a file from infinite inclusion.
</div>
</body>
</html>

72
doc/ref/iterate.html Normal file
View File

@ -0,0 +1,72 @@
<html>
<head>
<title>BOOST_PP_ITERATE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATE</b> macro initiates a <i>file-iteration</i>.
</div>
<h4>Usage</h4>
<div class="code">
#include <b>BOOST_PP_ITERATE</b>()
</div>
<h4>Remarks</h4>
<div>
Arguments to this macro are passed as <i>external named arguments</i> in one of two
ways--either through <b>BOOST_PP_FILENAME_<i>x</i></b> and <b>BOOST_PP_ITERATION_LIMITS</b> <i>or</i>
through <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b>.&nbsp;
</div>
<div>
Three pieces of information are required to perform a <i>file-iteration</i>.&nbsp;
First, the name of a file to iterate over.&nbsp;
This is passed via <b>BOOST_PP_FILENAME_<i>x</i></b> <i>or</i> as part of <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b>.&nbsp;
The <i>file-iteration</i> mechanism will repeatedly include this file with iteration values ranging from a lower bound to an upper bound--the second and third <i>required</i> parameters.&nbsp;
These two boundaries are either passed through <b>BOOST_PP_ITERATION_LIMITS</b> <i>or</i> as part of <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b>.
</div>
<div>
Optionally, a fourth parameter may be passed that associates flags with an iteration.&nbsp;
These flags are primarily useful to distinguish one iteration from another in the same file.&nbsp;
This parameter can only be passed through <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b>.
</div>
<div>
While a <i>file-iteration</i> is in progress, <b>BOOST_PP_IS_ITERATING</b> is defined as <i>1</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="filename_x.html">BOOST_PP_FILENAME_<i>x</i></a></li>
<li><a href="is_iterating.html">BOOST_PP_IS_ITERATING</a></li>
<li><a href="iteration_limits.html">BOOST_PP_ITERATION_LIMITS</a></li>
<li><a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_<i>x</i></a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 10, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#define <a href="filename_x.html">BOOST_PP_FILENAME_1</a> "file.h"
#define <a href="iteration_limits.html">BOOST_PP_ITERATION_LIMITS</a> (11, 20)
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#else
current iteration value is <a href="iteration.html">BOOST_PP_ITERATION</a>()
#endif
</pre></div>
</body>
</html>

44
doc/ref/iteration.html Normal file
View File

@ -0,0 +1,44 @@
<html>
<head>
<title>BOOST_PP_ITERATION</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION</b> macro expands to the iteration value of the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp,html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iterations_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 3, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
value == <a href="iteration.html">BOOST_PP_ITERATION</a>()
#endif
</pre></div>
</body>
</html>

View File

@ -0,0 +1,57 @@
<html>
<head>
<title>BOOST_PP_ITERATION_DEPTH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_DEPTH</b> macro expands to the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION_DEPTH</b>()
</div>
<h4>Remarks</h4>
<div>
If a <i>file-iteration</i> is not in progress, this macro expands to <i>0</i>.&nbsp;
Otherwise, it expands to the current depth of <i>file-iteration</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 3, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
+ depth <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>()
// ...
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_2</a> \
(3, (1, <a href="iteration.html">BOOST_PP_ITERATION</a>(), "file.h")) \
/**/
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 2
- depth <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>()
// ...
#endif
</pre></div>
</body>
</html>

View File

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_ITERATION_FINISH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_FINISH</b> macro expands to the upper bound of the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION_FINISH</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 10, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
start -> <a href="iteration_start.html">BOOST_PP_ITERATION_START</a>()
iteration -> <a href="iteration.html">BOOST_PP_ITERATION</a>()
finish -> <a href="iteration_finish.html">BOOST_PP_ITERATION_FINISH</a>()
#endif
</pre></div>
</body>
</html>

View File

@ -0,0 +1,57 @@
<html>
<head>
<title>BOOST_PP_ITERATION_FLAGS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_FLAGS</b> macro retrieves flags associated with the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION_FLAGS</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
// 1st iteration:
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (4, (1, 10, "file.h", 0x0001))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
// 2nd iteration:
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (4, (1, 10, "file.h", 0x0002))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1 \
&amp;&amp; <a href="iteration_flags.html">BOOST_PP_ITERATION_FLAGS</a>() == 0x0001 \
/**/
{ 1st }
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1 \
&amp;&amp; <a href="iteration_flags.html">BOOST_PP_ITERATION_FLAGS</a>() == 0x0002 \
/**/
{ 2nd }
#endif
</pre></div>
</body>
</html>

View File

@ -0,0 +1,48 @@
<html>
<head>
<title>BOOST_PP_ITERATION_LIMITS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_LIMITS</b> macro is a user-defined <i>named external argument</i> used by <b>BOOST_PP_ITERATE</b>.&nbsp;
It denotes the lower and upper bounds of a <i>file-iteration</i>.
</div>
<h4>Usage</h4>
<div class="code">
#define <b>BOOST_PP_ITERATION_LIMITS</b> (<i>start</i>, <i>finish</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>start</dt>
<dd>
The lower bound (inclusive) of a <i>file-iteration</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_ITERATION</b>.
</dd>
<dt>finish</dt>
<dd>
The upper bound (inclusive) of a <i>file-iteration</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_ITERATION</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Note that there is a whitespace character after the macro identifier.
</div>
<div>
This macro is part of the secondary method of passing arguments to <b>BOOST_PP_ITERATE</b>.&nbsp;
The other part is <b>BOOST_PP_FILENAME_<i>x</i></b>.&nbsp;Both <i>start</i> and <i>finish</i> are <i>evaluated parameters</i>.&nbsp;
This implies that they may include simple arithmetic.
</div>
<div>
This macro is automatically undefined for reuse by a call to <b>BOOST_PP_ITERATE</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="filename_x.html">BOOST_PP_FILENAME_<i>x</i></a></li>
<li><a href="iterate.html">BOOST_PP_ITERATE</a></li>
<li><a href="limit_iteration.html">BOOST_PP_LIMIT_ITERATION</a></li>
</ul>
</body>
</html>

View File

@ -0,0 +1,66 @@
<html>
<head>
<title>BOOST_PP_ITERATION_PARAMS_x</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b> macro is a user-defined <i>named external argument</i> used by <b>BOOST_PP_ITERATE</b>.&nbsp;
It denotes the lower bound, upper bound, and the filename of a <i>file-iteration</i>.&nbsp;It can optionally denote flags associated with a <i>file-iteration</i> as well.
</div>
<h4>Usage</h4>
<div class="code">
#define <b>BOOST_PP_ITERATION_PARAMS_<i>x</i></b> (<i>c</i>, (<i>start</i>, <i>finish</i>, <i>filename</i> [, <i>flags</i>]))
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The iteration depth of the next <i>file-iteration</i>.&nbsp;
This value <i>must</i> be the current iteration depth + <i>1</i>.
</dd>
<dt>c</dt>
<dd>
The number of parameters.&nbsp;
If <i>flags</i> is specified, this value must be <i>4</i>.&nbsp;
Otherwise, it must be <i>3</i>.
</dd>
<dt>start</dt>
<dd>
The lower bound (inclusive) of a <i>file-iteration</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_ITERATION</b>.
</dd>
<dt>finish</dt>
<dd>
The upper bound (inclusive) of a <i>file-iteration</i>.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_ITERATION</b>.
</dd>
<dt>filename</dt>
<dd>
A quoted or angle-bracketed filename to used as the target of a <i>file-iteration</i>.
</dd>
<dt>[flags]</dt>
<dd>
A quoted or angle-bracketed filename to used as the target of a <i>file-iteration</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Note that there is a whitespace character after the macro identifier.
</div>
<div>
This macro is must be defined as an <i>array</i> of arguments in one of the two formats above (with or without <i>flags</i>).
It is the primary method of passing arguments to <b>BOOST_PP_ITERATE</b>.&nbsp;
Both <i>start</i> and <i>finish</i> are <i>evaluated parameters</i>, which implies that simple arithmetic can be used.
</div>
<div>
This macro is automatically undefined for reuse by a call to <b>BOOST_PP_ITERATE</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="iterate.html">BOOST_PP_ITERATE</a></li>
<li><a href="limit_iteration.html">BOOST_PP_LIMIT_ITERATION</a></li>
</ul>
</body>
</html>

View File

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_ITERATION_START</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_ITERATION_START</b> macro expands to the lower bound of the current <i>file-iteration</i> depth.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_ITERATION_START</b>()
</div>
<h4>Remarks</h4>
<div>
This macro is only valid when a <i>file-iteration</i> is in progress.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.hpp.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// file.h
#if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
#ifndef FILE_H_
#define FILE_H_
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 10, "file.h"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
#endif
#elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
start -> <a href="iteration_start.html">BOOST_PP_ITERATION_START</a>()
iteration -> <a href="iteration.html">BOOST_PP_ITERATION</a>()
finish -> <a href="iteration_finish.html">BOOST_PP_ITERATION_FINISH</a>()
#endif
</pre></div>
</body>
</html>

54
doc/ref/less.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_LESS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LESS</b> macro compares two values for lesser magnitude.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LESS</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is less than <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LESS_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="less_d.html">BOOST_PP_LESS_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/less.hpp.html">&lt;boost/preprocessor/comparison/less.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/less.hpp.html">boost/preprocessor/comparison/less.hpp</a>&gt;
<a href="less.html">BOOST_PP_LESS</a>(4, 3) // expands to 0
<a href="less.html">BOOST_PP_LESS</a>(3, 4) // expands to 1
</pre></div>
</body>
</html>

59
doc/ref/less_d.html Normal file
View File

@ -0,0 +1,59 @@
<html>
<head>
<title>BOOST_PP_LESS_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LESS_D</b> macro compares two values for lesser magnitude.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LESS_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is less than <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="less.html">BOOST_PP_LESS</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/less.hpp.html">&lt;boost/preprocessor/comparison/less.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/less.hpp.html">boost/preprocessor/comparison/less.hpp</a>&gt;
#include &lt;<a href="../headers/list/filter.hpp.html">boost/preprocessor/list/filter.hpp</a>&gt;
#define LIST (1, (2, (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))))
#define PRED(d, _, num) <a href="less_d.html">BOOST_PP_LESS_D</a>(d, num, 3)
<a href="list_filter.html">BOOST_PP_LIST_FILTER</a>(PRED, nil, LIST)
// expands to (1, (2, <a href="nil.html">BOOST_PP_NIL</a>))
</pre></div>
</body>
</html>

54
doc/ref/less_equal.html Normal file
View File

@ -0,0 +1,54 @@
<html>
<head>
<title>BOOST_PP_LESS_EQUAL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LESS_EQUAL</b> macro compares two values for equality or lesser magnitude.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LESS_EQUAL</b>(<i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is lesser than or equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LESS_EQUAL_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="less_equal_d.html">BOOST_PP_LESS_EQUAL_D</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/less_equal.hpp.html">&lt;boost/preprocessor/comparison/less_equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/less_equal.hpp.html">boost/preprocessor/comparison/less_equal.hpp</a>&gt;
<a href="less_equal.html">BOOST_PP_LESS_EQUAL</a>(4, 3) // expands to 0
<a href="less_equal.html">BOOST_PP_LESS_EQUAL</a>(5, 5) // expands to 1
</pre></div>
</body>
</html>

59
doc/ref/less_equal_d.html Normal file
View File

@ -0,0 +1,59 @@
<html>
<head>
<title>BOOST_PP_LESS_EQUAL_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LESS_EQUAL_D</b> macro compares two values for equality or lesser magnitude.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LESS_EQUAL_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
</dd>
<dt>x</dt>
<dd>
The left operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
<dt>y</dt>
<dd>
The right operand of the comparison.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>x</i> is less than or equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
Otherwise, it expands to <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="less_equal.html">BOOST_PP_LESS_EQUAL</a></li>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/comparison/less_equal.hpp.html">&lt;boost/preprocessor/comparison/less_equal.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/comparison/less_equal.hpp.html">boost/preprocessor/comparison/less_equal.hpp</a>&gt;
#include &lt;<a href="../headers/list/filter.hpp.html">boost/preprocessor/list/filter.hpp</a>&gt;
#define LIST (1, (2, (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))))
#define PRED(d, _, num) <a href="less_equal_d.html">BOOST_PP_LESS_EQUAL_D</a>(d, num, 4)
<a href="list_filter.html">BOOST_PP_LIST_FILTER</a>(PRED, nil, LIST)
// expands to (1, (2, (3, (4, <a href="nil.html">BOOST_PP_NIL</a>))))
</pre></div>
</body>
</html>

24
doc/ref/limit_dim.html Normal file
View File

@ -0,0 +1,24 @@
<html>
<head>
<title>BOOST_PP_LIMIT_DIM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_DIM</b> macro defines the maximum number of available <b>BOOST_PP_REPEAT</b> dimensions.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_DIM</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>3</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

23
doc/ref/limit_for.html Normal file
View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_FOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_FOR</b> macro defines the maximum number of <b>BOOST_PP_FOR</b> repetitions.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_FOR</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>256</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_ITERATION</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_ITERATION</b> macro defines the maximum number of <i>local</i> and <i>file</i> iterations.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_ITERATION</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>256</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_ITERATION_DIM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_ITERATION_DIM</b> macro defines the maximum depth of <i>file-iteration</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_ITERATION_DIM</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>5</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

23
doc/ref/limit_mag.html Normal file
View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_MAG</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_MAG</b> macro defines the maximum input and result magnitudes of arithmetic.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_MAG</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>256</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

23
doc/ref/limit_repeat.html Normal file
View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_REPEAT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_REPEAT</b> macro defines the maximum number of repetitions supported by each <b>BOOST_PP_REPEAT</b> dimension.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_REPEAT</b>
</div>
<h4>Remarks</h4>
<div>
This macro current expands to <i>256</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_SLOT_COUNT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_SLOT_COUNT</b> macro defines the number of available <i>evaluated slots</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_SLOT_COUNT</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>5</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_SLOT_SIG</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_SLOT_SIG</b> macro defines the number of significant base-10 digits that can be evaluated by the <i>slot</i> mechanism.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_SLOT_SIG</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>10</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

23
doc/ref/limit_tuple.html Normal file
View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_TUPLE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_TUPLE</b> macro defines the maximum <i>tuple</i> size supported by the library.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_TUPLE</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>25</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

23
doc/ref/limit_while.html Normal file
View File

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_WHILE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_WHILE</b> macro defines the maximum number of <b>BOOST_PP_WHILE</b> iterations.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_WHILE</b>
</div>
<h4>Remarks</h4>
<div>
This macro currently expands to <i>256</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/config/limits.hpp.html">&lt;boost/preprocessor/config/limits.hpp&gt;</a>
</div>
</body>
</html>

101
doc/ref/line.html Normal file
View File

@ -0,0 +1,101 @@
<html>
<head>
<title>BOOST_PP_LINE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LINE</b> macro places notes encoded as line directives in the preprocessing output.
</div>
<h4>Usage</h4>
<div class="code">
#line <b>BOOST_PP_LINE</b>(<i>line</i>, <i>file</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>line</dt>
<dd>
The new line number of the trailing line.&nbsp;
The predefined macro <i>__LINE__</i> is commonly used.
</dd>
<dt>file</dt>
<dd>
Typically the name of the current file.&nbsp;
However, any informative text will work.&nbsp;
This text is internally stringized, so quotation marks are unnecessary.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If the macro <b>BOOST_PP_CONFIG_EXTENDED_LINE_INFO</b> is defined as <i>1</i> and a <i>file-iteration</i>
is in progress, this macro will automatically insert debugging information about the state of <i>file-iteration</i>.&nbsp;
This information will show the all of the current iteration values with the inner most iteration last.
</div>
<div>
This information is useful when errors might be spanning multiple iterations of the same source text.&nbsp;
Finding any errors is sometimes less than straightforward.&nbsp;
Use of this macro can provide information to make this much easier.&nbsp;
For example, instead of getting several errors like this:
<div><i>
"file.hpp", line 2: error: expected a ";"<br>
"file.hpp", line 4: error: improperly terminated macro invocation<br>
</i></div>
You might get something like this instead....
<i><div>
"file.hpp [1]", line 2: error: expected a ";"<br>
"file.hpp [5]", line 4: error: improperly terminated macro invocation<br>
</i></div>
It is immediately evident that this error is spanning multiple iterations of the same source text.&nbsp;
If it wasn't, the same errors would occur on each iteration.
</div>
<div>
It must be noted however, that some compilers don't like filenames that aren't actually files.&nbsp;
Those compilers typically issues warnings about the bad filename.&nbsp;
This makes it a good idea to only define <b>BOOST_PP_CONFIG_EXTENDED_LINE_INFO</b> to <i>1</i> <i>only</i> when debugging.
</div>
<h4>See Also</h4>
<ul>
<li><a href="config_extended_line_info.html">BOOST_PP_CONFIG_EXTENDED_LINE_INFO</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/debug/line.hpp.html">&lt;boost/preprocessor/debug/line.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
// sample.cpp
#if !defined(<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>)
#define <a href="config_extended_line_info.html">BOOST_PP_CONFIG_EXTENDED_LINE_INFO</a> 1
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
#include &lt;<a href="../headers/cat.hpp.html">boost/preprocessor/cat.hpp</a>&gt;
#include &lt;<a href="../headers/debug/line.hpp.html">boost/preprocessor/debug/line.hpp</a>&gt;
#include &lt;<a href="../headers/iteration/iterate.hpp.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
namespace sample {
#define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 5, "sample.cpp"))
#include <a href="iterate.html">BOOST_PP_ITERATE</a>()
} // sample
int main(void) {
return 0;
}
#else
#line <a href="line.html">BOOST_PP_LINE</a>(1, sample.cpp)
int <a href="cat.html">BOOST_PP_CAT</a>(x, <a href="iteration.html">BOOST_PP_ITERATION</a>())); // extra parenthesis
struct <a href="cat.html">BOOST_PP_CAT</a>(s, <a href="dec.html">BOOST_PP_DEC</a>(<a href="iteration.html">BOOST_PP_ITERATION</a>()) {
// missing a parenthesis
// ...
};
#endif
</pre></div>
</body>
</html>

58
doc/ref/list_append.html Normal file
View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_LIST_APPEND</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_APPEND</b> macro appends two <i>lists</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_APPEND</b>(<i>a</i>, <i>b</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>a</dt>
<dd>
The first <i>list</i>.
</dd>
<dt>b</dt>
<dd>
The second <i>list</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro appends two lists.&nbsp;
For example, if <i>a</i> is (<i>1</i>, (<i>2</i>, (<i>3</i>, <b>BOOST_PP_NIL</b>))) and <i>b</i> is (<i>4</i>, (<i>5</i>, <b>BOOST_PP_NIL</b>)),
this macro will expand to:
<div>
(<i>1</i>, (<i>2</i>, (<i>3</i>, (<i>4</i>, (<i>5</i>, <b>BOOST_PP_NIL</b>)))))
</div>
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LIST_APPEND_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_append_d.html">BOOST_PP_LIST_APPEND_D</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/append.hpp.html">&lt;boost/preprocessor/list/append.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/list/append.hpp.html">boost/preprocessor/list/append.hpp</a>&gt;
#define L1 (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
#define L2 (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))
<a href="list_append.html">BOOST_PP_LIST_APPEND</a>e(L1, L2)
// expands to (a, (b, (c, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))))
</pre></div>
</body>
</html>

View File

@ -0,0 +1,85 @@
<html>
<head>
<title>BOOST_PP_LIST_APPEND_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_APPEND_D</b> macro appends two <i>lists</i>.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_APPEND_D</b>(<i>d</i>, <i>a</i>, <i>b</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.
</dd>
<dt>a</dt>
<dd>
The first <i>list</i>.
</dd>
<dt>b</dt>
<dd>
The second <i>list</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro appends two lists.&nbsp;
For example, if <i>a</i> is (<i>1</i>, (<i>2</i>, (<i>3</i>, <b>BOOST_PP_NIL</b>))) and <i>b</i> is (<i>4</i>, (<i>5</i>, <b>BOOST_PP_NIL</b>)),
this macro will expand to:
<div>
(<i>1</i>, (<i>2</i>, (<i>3</i>, (<i>4</i>, (<i>5</i>, <b>BOOST_PP_NIL</b>)))))
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_append.html">BOOST_PP_LIST_APPEND</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/append.hpp.html">&lt;boost/preprocessor/list/append.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/arithmetic/dec.hpp.html">boost/preprocessor/arithmetic/dec.hpp</a>&gt;
#include &lt;<a href="../headers/control/while.hpp.html">boost/preprocessor/control/while.hpp</a>&gt;
#include &lt;<a href="../headers/list/append.hpp.html">boost/preprocessor/list/append.hpp</a>&gt;
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/elem.hpp</a>&gt;
#define LIST (1, (2, (3, <a href="nil.html">BOOST_PP_NIL</a>)))
#define PRED(d, state) <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, 1, state)
#define OP(d, state) \
( \
<a href="list_append_d.html">BOOST_PP_LIST_APPEND_D</a>( \
d, <a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, 0, state), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, 2, state) \
), \
<a href="dec.html">BOOST_PP_DEC</a>( \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, 1, state) \
), \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, 2, state) \
) \
/**/
#define LIST_MULTIPLY(c, list) \
<a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>( \
3, 0, \
<a href="while.html">BOOST_PP_WHILE</a>( \
PRED, OP, \
(<a href="nil.html">BOOST_PP_NIL</a>, c, list) \
) \
) \
/**/
LIST_MULTIPLY(3, LIST)
// expands to (1, (2, (3, (1, (2, (3, (1, (2, (3, <a href="nil.html">BOOST_PP_NIL</a>)))))))))
</pre></div>
</body>
</html>

50
doc/ref/list_at.html Normal file
View File

@ -0,0 +1,50 @@
<html>
<head>
<title>BOOST_PP_LIST_AT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_AT</b> macro extracts an element in a <i>list</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_AT</b>(<i>list</i>, <i>index</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>list</dt>
<dd>
The <i>list</i> from which a element is to be extracted.&nbsp;
This <i>list</i> must have at least <i>index</i> + <i>1</i> elements.
</dd>
<dt>index</dt>
<dd>
The zero-based position in the <i>list</i> of the element to be extracted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LIST_AT_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_at_d.html">BOOST_PP_LIST_AT_D</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/at.hpp.html">&lt;boost/preprocessor/list/at.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/list/at.hpp.html">boost/preprocessor/list/at.hpp</a>&gt;
#define LIST (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
<a href="list_at.html">BOOST_PP_LIST_AT</a>(LIST, 0) // expands to a
<a href="list_at.html">BOOST_PP_LIST_AT</a>(LIST, 2) // expands to c
</pre></div>
</body>
</html>

52
doc/ref/list_at_d.html Normal file
View File

@ -0,0 +1,52 @@
<html>
<head>
<title>BOOST_PP_LIST_AT_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_AT_D</b> macro extracts an element in a <i>list</i>.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_AT_D</b>(<i>d</i>, <i>list</i>, <i>index</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.
</dd>
<dt>list</dt>
<dd>
The <i>list</i> from which a element is to be extracted.&nbsp;
This <i>list</i> must have at least <i>index</i> + <i>1</i> elements.
</dd>
<dt>index</dt>
<dd>
The zero-based position in the <i>list</i> of the element to be extracted.
</dd>
</dl>
<h4>See Also</h4>
<ul>
<li><a href="list_at.html">BOOST_PP_LIST_AT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/at.hpp.html">&lt;boost/preprocessor/list/at.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/control/while.hpp.html">boost/preprocessor/control/while.hpp</a>&gt;
#include &lt;<a href="../headers/list/at.hpp.html">boost/preprocessor/list/at.hpp</a>&gt;
#define LIST (7, (2, (0, (1, <a href="nil.html">BOOST_PP_NIL</a>))))
#define PRED(d, state) <a href="list_at_d.html">BOOST_PP_LIST_AT_D</a>(d, state, 0)
#define OP(d, state) <a href="list_rest.html">BOOST_PP_LIST_REST</a>(state)
<a href="while.html">BOOST_PP_WHILE</a>(PRED, OP, LIST) // expands to (0, (1, <a href="nil.html">BOOST_PP_NIL</a>))
</pre></div>
</body>
</html>

47
doc/ref/list_cat.html Normal file
View File

@ -0,0 +1,47 @@
<html>
<head>
<title>BOOST_PP_LIST_CAT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_CAT</b> macro concatenates all elements in a <i>list</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_CAT</b>(<i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>list</dt>
<dd>
The <i>list</i> whose elements are to be concatenated.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Elements are concatenated left-to-right starting with index <i>0</i>.
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LIST_CAT_D</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_cat_d.html">BOOST_PP_LIST_CAT_D</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/cat.hpp.html">&lt;boost/preprocessor/list/cat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/list/cat.hpp.html">boost/preprocessor/list/cat.hpp</a>&gt;
#define LIST (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
<a href="list_cat.html">BOOST_PP_LIST_CAT</a>(LIST) // expands to abc
</pre></div>
</body>
</html>

56
doc/ref/list_cat_d.html Normal file
View File

@ -0,0 +1,56 @@
<html>
<head>
<title>BOOST_PP_LIST_CAT_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_CAT_D</b> macro concatenates all elements in a <i>list</i>.&nbsp;
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_CAT_D</b>(<i>d</i>, <i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
<dd>
The next available <b>BOOST_PP_WHILE</b> iteration.
</dd>
<dt>list</dt>
<dd>
The <i>list</i> whose elements are to be concatenated.
</dd>
</dl>
<h4>Remarks</h4>
<div>
Elements are concatenated left-to-right starting with index <i>0</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_cat.html">BOOST_PP_LIST_CAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/cat.hpp.html">&lt;boost/preprocessor/list/cat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/cat.hpp.html">boost/preprocessor/cat.hpp</a>&gt;
#include &lt;<a href="../headers/list/cat.hpp.html">boost/preprocessor/list/cat.hpp</a>&gt;
#include &lt;<a href="../headers/list/fold_left.hpp.html">boost/preprocessor/list/fold_left.hpp</a>&gt;
#define LISTS \
((a, (b, <a href="nil.html">BOOST_PP_NIL</a>)), \
((d, (e, <a href="nil.html">BOOST_PP_NIL</a>)), \
((e, (f, <a href="nil.html">BOOST_PP_NIL</a>)), \
<a href="ni.html">BOOST_PP_NIL</a>))) \
/**/
#define OP(d, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, <a href="list_cat_d.html">BOOST_PP_LIST_CAT_D</a>(d, x))
<a href="list_fold_left.html">BOOST_PP_LIST_FOLD_LEFT</a>(OP, _, LISTS) // expands to _abcdef
</pre></div>
</body>
</html>

76
doc/ref/list_cons.html Normal file
View File

@ -0,0 +1,76 @@
<html>
<head>
<title>BOOST_PP_LIST_CONS</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_CONS</b> macro is a <i>list</i> constructor.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_CONS</b>(<i>head</i>, <i>tail</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>head</dt>
<dd>
An element in a <i>list</i>.
</dd>
<dt>tail</dt>
<dd>
Either a <i>list</i>, <b>BOOST_PP_LIST_NIL</b>, or <b>BOOST_PP_NIL</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro appends a new head to an existing <i>list</i> or creates a <i>list</i> from <b>BOOST_PP_LIST_NIL</b>.
</div>
<div>
This macro is no longer necessary.&nbsp;
For example...
<div>
<b>BOOST_PP_LIST_CONS</b>(a, <b>BOOST_PP_LIST_CONS</b>(b, <b>BOOST_PP_LIST_NIL</b>)))
</div>
...is just an explicit way of writing the following:
<div>
(a, (b, <b>BOOST_PP_NIL</b>))
</div>
Because of this, this macro is deprecated.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_nil.html">BOOST_PP_LIST_NIL</a></li>
<li><a href="nil.html">BOOST_PP_NIL</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/adt.hpp.html">&lt;boost/preprocessor/list/adt.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/list/adt.hpp.html">boost/preprocessor/list/adt.hpp</a>&gt;
#define OLD \
<a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
a, \
<a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
b, \
<a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
c, \
<a href="list_nil.html">BOOST_PP_LIST_NIL</a> \
) \
) \
) \
/**/
#define NEW (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
<a href="list_first.html">BOOST_PP_LIST_FIRST</a>(OLD) == <a href="list_first.html">BOOST_PP_LIST_FIRST</a>(NEW)
// expands to a == a
<a href="list_rest.html">BOOST_PP_LIST_REST</a>(OLD) == <a href="list_rest.html">BOOST_PP_LIST_REST</a>(NEW)
// expands to (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)) == (b, (c, <a href="nil.html">BOOST_PP_NIL</a>))
</pre></div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More