preliminary set support

[SVN r15908]
This commit is contained in:
Paul Mensonides
2002-10-13 05:47:23 +00:00
parent b2bd498a4f
commit 33daabd87d
77 changed files with 2878 additions and 208 deletions

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

@ -0,0 +1,23 @@
<html>
<head>
<title>BOOST_PP_LIMIT_SET</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIMIT_SET</b> macro defines the maximum <i>set</i> size supported by the library.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIMIT_SET</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

@ -16,7 +16,7 @@
<dt>macro</dt>
<dd>
A macro of the form <i>macro</i>(<i>r</i>, <i>data</i>, <i>i</i>, <i>elem</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_LIST_FOR_EACH</b> with each element in <i>list</i>.&nbsp;
This macro is expanded by <b>BOOST_PP_LIST_FOR_EACH_I</b> with each element in <i>list</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition, the auxiliary <i>data</i>, the index of the current element, and the current element.
</dd>
<dt>data</dt>

45
doc/ref/set_cat.html Normal file
View File

@ -0,0 +1,45 @@
<html>
<head>
<title>BOOST_PP_SET_CAT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_CAT</b> macro concatenates all elements in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_CAT</b>(<i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</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>
For maximum efficiency, use <b>BOOST_PP_SET_CAT_S</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_cat_s.html">BOOST_PP_SET_CAT_S</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/cat.hpp.html">&lt;boost/preprocessor/set/cat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/cat.hpp.html">boost/preprocessor/set/cat.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_cat.html">BOOST_PP_SET_CAT</a>(SET) // expands to abc
</pre></div>
</body>
</html>

39
doc/ref/set_cat_s.html Normal file
View File

@ -0,0 +1,39 @@
<html>
<head>
<title>BOOST_PP_SET_CAT_S</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_CAT_S</b> macro concatenates all elements in a <i>set</i>.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_LEFT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_CAT_S</b>(<i>s</i>, <i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>set</dt>
<dd>
The <i>set</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="set_cat.html">BOOST_PP_SET_CAT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/cat.hpp.html">&lt;boost/preprocessor/set/cat.hpp&gt;</a>
</div>
</body>
</html>

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

@ -0,0 +1,55 @@
<html>
<head>
<title>BOOST_PP_SET_ELEM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_ELEM</b> macro extracts an element from a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_ELEM</b>(<i>i</i>, <i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>i</dt>
<dd>
The zero-based index of the element to be extracted.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> from which an element is to be extracted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The index <i>i</i> must be in the range of <i>0</i> to <b>BOOST_PP_SET_SIZE</b>(<i>set</i>) - <i>1</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/elem.hpp.html">&lt;boost/preprocessor/set/elem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/elem.hpp.html">boost/preprocessor/set/elem.hpp</a>&gt;
<a href="set_elem.html">BOOST_PP_SET_ELEM</a>(1, (a)(b)(c)) // expands to b
#define SET \
(0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \
(10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \
(20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \
(30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \
(40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \
(50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \
(60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \
(70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \
(80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \
(90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \
/**/
<a href="set_elem.html">BOOST_PP_SET_ELEM</a>(88, SET) // expands to 88
</pre></div>
</body>
</html>

42
doc/ref/set_enum.html Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<title>BOOST_PP_SET_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_ENUM</b> macro enumerates the elements in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_ENUM</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> from whose elements are to be enumerated.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to a comma-separated list of the elements in <i>set</i>.&nbsp;
For example, <b>BOOST_PP_SET_ENUM</b>((<i>x</i>)(<i>y</i>)(<i>z</i>)) expands to...
<div>
<i>x</i>, <i>y</i>, <i>z</i>
</div>
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/enum.hpp.html">&lt;boost/preprocessor/set/enum.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/enum.hpp.html">boost/preprocessor/set/enum.hpp</a>&gt;
#define SET (B)(O)(O)(S)(T)
<a href="set_enum.html">BOOST_PP_SET_ENUM</a>(SET) // expands to B, O, O, S, T
</pre></div>
</body>
</html>

63
doc/ref/set_filter.html Normal file
View File

@ -0,0 +1,63 @@
<html>
<head>
<title>BOOST_PP_SET_FILTER</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FILTER</b> macro filters a <i>set</i> according to a supplied criterion.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FILTER</b>(<i>pred</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>pred</dt>
<dd>
A ternary predicate of the form <i>pred</i>(<i>s</i>, <i>data</i>, <i>elem</i>).&nbsp;
This predicate is expanded by <b>BOOST_PP_SET_FILTER</b> for each element in <i>set</i> with the next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step,
the auxiliary <i>data</i>, and the current element in <i>set</i>.&nbsp;
This macro must return a integral value in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.&nbsp;
If this predicate expands to non-zero for a certain element, that element is included in the resulting <i>set</i>.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>pred</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be filtered.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands <i>pred</i> for each element in <i>set</i>.&nbsp;
It builds a new <i>set</i> out of each element for which <i>pred</i> returns non-zero.
</div>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_FILTER_S</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
<li><a href="set_filter_s.html">BOOST_PP_SET_FILTER_S</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/filter.hpp.html">&lt;boost/preprocessor/set/filter.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/set/filter.hpp.html">boost/preprocessor/set/filter.hpp</a>&gt;
#define SET (1)(3)(2)(5)
#define PRED(s, data, elem) <a href="less_equal.html">BOOST_PP_LESS_EQUAL</a>(elem, data)
<a href="set_filter.html">BOOST_PP_SET_FILTER</a>(PRED, 3, SET)
// expands to (1)(3)(2)
</pre></div>
</body>
</html>

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

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_SET_FILTER_S</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FILTER_S</b> macro filters a <i>set</i> according to a supplied criterion.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_LEFT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FILTER_S</b>(<i>s</i>, <i>pred</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>pred</dt>
<dd>
A ternary predicate of the form <i>pred</i>(<i>s</i>, <i>data</i>, <i>elem</i>).&nbsp;
This predicate is expanded by <b>BOOST_PP_SET_FILTER</b> for each element in <i>set</i> with the next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step,
the auxiliary <i>data</i>, and the current element in <i>set</i>.&nbsp;
This macro must return a integral value in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.&nbsp;
If this predicate expands to non-zero for a certain element, that element is included in the resulting <i>set</i>.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>pred</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be filtered.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands <i>pred</i> for each element in <i>set</i>.&nbsp;
It builds a new <i>set</i> out of each element for which <i>pred</i> returns non-zero.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
<li><a href="set_filter.html">BOOST_PP_SET_FILTER</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/filter.hpp.html">&lt;boost/preprocessor/set/filter.hpp&gt;</a>
</div>
</body>
</html>

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

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_SET_FIRST_N</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FIRST_N</b> macro expands to a <i>set</i> of the first <i>n</i> elements of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FIRST_N</b>(<i>n</i>, <i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>n</dt>
<dd>
The number of elements to extract.
</dd>
<dt>list</dt>
<dd>
The <i>set</i> from which the elements are extracted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro extracts <i>n</i> elements from the beginning of <i>set</i> and returns them as a new <i>set</i>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_rest_n.html">BOOST_PP_SET_REST_N</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/first_n.hpp.html">&lt;boost/preprocessor/set/first_n.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/first_n.hpp.html">boost/preprocessor/set/first_n.hpp</a>&gt;
#define SET (a)(b)(c)(d)(e)
<a href="set_first_n.html">BOOST_PP_SET_FIRST_N</a>(2, SET) // expands to (a)(b)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,62 @@
<html>
<head>
<title>BOOST_PP_SET_FOLD_LEFT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOLD_LEFT</b> macro folds (or accumulates) the elements of a <i>set</i> left-to-right.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOLD_LEFT</b>(<i>op</i>, <i>state</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>op</dt>
<dd>
A ternary operation of the form <i>op</i>(<i>s</i>, <i>state</i>, <i>elem</i>).&nbsp;
This macro is called for each element in <i>set</i>--each time returning a new <i>state</i>.&nbsp;
This operation is expanded by <b>BOOST_PP_SET_FOLD_LEFT</b> with the next available fold step,
the current <i>state</i>, and the current element.
</dd>
<dt>state</dt>
<dd>
The initial state of the fold.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be folded.
</dd>
</dl>
<h4>Remarks</h4>
<div>
For the <i>set</i>, (<i>0</i>)(<i>1</i>)(<i>2</i>), this macro expands to:
<div>
<i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>state</i>, <i>0</i>), <i>1</i>), <i>2</i>)
</div>
</div>
<div>
For maximum efficiency, <b>BOOST_PP_SET_FOLD_LEFT</b> can be reentered with <b>BOOST_PP_SET_FOLD_LEFT_<i>s</i></b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_fold_left_s.html">BOOST_PP_SET_FOLD_LEFT_<i>s</i></a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/fold_left.hpp.html">&lt;boost/preprocessor/set/fold_left.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/set/fold_left.hpp.html">boost/preprocessor/set/fold_left.hpp</a>&gt;
#define SET (b)(o)(o)(s)(t)
#define OP(s, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, x)
<a href="set_fold_left.html">BOOST_PP_SET_FOLD_LEFT</a>(OP, <a href="set_head.html">BOOST_PP_SET_HEAD</a>(SET), <a href="set_tail.html">BOOST_PP_SET_TAIL</a>(SET)) // expands to boost
</pre></div>
</body>
</html>

View File

@ -0,0 +1,68 @@
<html>
<head>
<title>BOOST_PP_SET_FOLD_LEFT_s</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOLD_LEFT_<i>s</i></b> macro folds (or accumulates) the elements of a <i>set</i> left-to-right.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_LEFT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOLD_LEFT_</b> ## <i>s</i>(<i>op</i>, <i>state</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>op</dt>
<dd>
A ternary operation of the form <i>op</i>(<i>s</i>, <i>state</i>, <i>elem</i>).&nbsp;
This macro is called for each element in <i>set</i>--each time returning a new <i>state</i>.&nbsp;
This operation is expanded by <b>BOOST_PP_SET_FOLD_LEFT</b> with the next available fold step,
the current <i>state</i>, and the current element.
</dd>
<dt>state</dt>
<dd>
The initial state of the fold.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be folded.
</dd>
</dl>
<h4>Remarks</h4>
<div>
For the <i>set</i>, (<i>0</i>)(<i>1</i>)(<i>2</i>), this macro expands to:
<div>
<i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>state</i>, <i>0</i>), <i>1</i>), <i>2</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_fold_left.html">BOOST_PP_SET_FOLD_LEFT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/fold_left.hpp.html">&lt;boost/preprocessor/set/fold_left.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/set/fold_left.hpp.html">boost/preprocessor/set/fold_left.hpp</a>&gt;
#include &lt;<a href="../headers/set/set.hpp.html">boost/preprocessor/set/set.hpp</a>&gt;
#define S1 (a)(b)(c)
#define S2 (S1)(S1)(S1)
#define OP(s, state, x) state (<a href="set_fold_left_s.html">BOOST_PP_SET_FOLD_LEFT_</a> ## s(OP_2, _, x))
#define OP_2(s, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, x)
<a href="set_fold_left.html">BOOST_PP_SET_FOLD_LEFT</a>(OP, <a href="set_nil.html">BOOST_PP_SET_NIL</a>, S2)
// expands to (_abc)(_abc)(_abc)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,64 @@
<html>
<head>
<title>BOOST_PP_SET_FOLD_RIGHT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOLD_RIGHT</b> macro folds (or accumulates) the elements of a <i>set</i> right-to-left.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOLD_RIGHT</b>(<i>op</i>, <i>state</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>op</dt>
<dd>
A ternary operation of the form <i>op</i>(<i>s</i>, <i>state</i>, <i>elem</i>).&nbsp;
This macro is called for each element in <i>set</i>--each time returning a new <i>state</i>.&nbsp;
This operation is expanded by <b>BOOST_PP_SET_FOLD_RIGHT</b> with the next available fold step,
the current <i>state</i>, and the current element.
</dd>
<dt>state</dt>
<dd>
The initial state of the fold.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be folded.
</dd>
</dl>
<h4>Remarks</h4>
<div>
For the <i>set</i>, (<i>0</i>)(<i>1</i>)(<i>2</i>), this macro expands to:
<div>
<i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>state</i>, <i>2</i>), <i>1</i>), <i>0</i>)
</div>
</div>
<div>
For maximum efficiency, <b>BOOST_PP_SET_FOLD_RIGHT</b> can be reentered with <b>BOOST_PP_SET_FOLD_RIGHT_<i>s</i></b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_fold_right_s.html">BOOST_PP_SET_FOLD_RIGHT_<i>s</i></a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/fold_right.hpp.html">&lt;boost/preprocessor/set/fold_right.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/set/elem.hpp.html">boost/preprocessor/set/elem.hpp</a>&gt;
#include &lt;<a href="../headers/set/fold_right.hpp.html">boost/preprocessor/set/fold_right.hpp</a>&gt;
#include &lt;<a href="../headers/set/pop_back.hpp.html">boost/preprocessor/set/pop_back.hpp</a>&gt;
#define SET (t)(s)(o)(o)(b)
#define OP(s, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, x)
<a href="set_fold_right.html">BOOST_PP_SET_FOLD_RIGHT</a>(OP, <a href="set_elem.html">BOOST_PP_SET_ELEM</a>(4, SET), <a href="set_pop_back.html">BOOST_PP_SET_POP_BACK</a>(SET)) // expands to boost
</pre></div>
</body>
</html>

View File

@ -0,0 +1,69 @@
<html>
<head>
<title>BOOST_PP_SET_FOLD_RIGHT_s</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOLD_RIGHT_<i>s</i></b> macro folds (or accumulates) the elements of a <i>set</i> right-to-left.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_RIGHT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOLD_RIGHT_</b> ## <i>s</i>(<i>op</i>, <i>state</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>op</dt>
<dd>
A ternary operation of the form <i>op</i>(<i>s</i>, <i>state</i>, <i>elem</i>).&nbsp;
This macro is called for each element in <i>set</i>--each time returning a new <i>state</i>.&nbsp;
This operation is expanded by <b>BOOST_PP_SET_FOLD_RIGHT</b> with the next available fold step,
the current <i>state</i>, and the current element.
</dd>
<dt>state</dt>
<dd>
The initial state of the fold.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be folded.
</dd>
</dl>
<h4>Remarks</h4>
<div>
For the <i>set</i>, (<i>0</i>)(<i>1</i>)(<i>2</i>), this macro expands to:
<div>
<i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>op</i>(<i>s</i>, <i>state</i>, <i>2</i>), <i>1</i>), <i>0</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_fold_right.html">BOOST_PP_SET_FOLD_RIGHT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/fold_right.hpp.html">&lt;boost/preprocessor/set/fold_right.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/set/fold_left.hpp.html">boost/preprocessor/set/fold_left.hpp</a>&gt;
#include &lt;<a href="../headers/set/fold_right.hpp.html">boost/preprocessor/set/fold_right.hpp</a>&gt;
#include &lt;<a href="../headers/set/set.hpp.html">boost/preprocessor/set/set.hpp</a>&gt;
#define S1 (a)(b)(c)
#define S2 (S1)(S1)(S1)
#define OP(s, state, x) state (<a href="set_fold_left_s.html">BOOST_PP_SET_FOLD_RIGHT_</a> ## s(OP_2, _, x))
#define OP_2(s, state, x) <a href="cat.html">BOOST_PP_CAT</a>(state, x)
<a href="set_fold_left.html">BOOST_PP_SET_FOLD_LEFT</a>(OP, <a href="set_nil.html">BOOST_PP_SET_NIL</a>, S2)
// expands to (_cba)(_cba)(_cba)
</pre></div>
</body>
</html>

62
doc/ref/set_for_each.html Normal file
View File

@ -0,0 +1,62 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH</b> macro repeats a macro for each element in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH</b>(<i>macro</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>macro</dt>
<dd>
A ternary macro of the form <i>macro</i>(<i>r</i>, <i>data</i>, <i>elem</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_SET_FOR_EACH</b> with each element in <i>set</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition, the auxiliary <i>data</i>, and the current element.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> for which <i>macro</i> will be invoked on each element.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>), it expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>data</i>, <i>a</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>b</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>c</i>)
</div>
</div>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_FOR_EACH_R</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each_r.html">BOOST_PP_SET_FOR_EACH_R</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each.hpp.html">&lt;boost/preprocessor/set/for_each.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/set/for_each.hpp.html">boost/preprocessor/set/for_each.hpp</a>&gt;
#define SET (w)(x)(y)(z)
#define MACRO(r, data, elem) <a href="cat.html">BOOST_PP_CAT</a>(elem, data)
<a href="set_for_each.html">BOOST_PP_SET_FOR_EACH</a>(MACRO, _, SET) // expands to w_ x_ y_ z_
</pre></div>
</body>
</html>

View File

@ -0,0 +1,62 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH_I</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH_I</b> macro repeats a macro for each element in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH_I</b>(<i>macro</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>macro</dt>
<dd>
A macro of the form <i>macro</i>(<i>r</i>, <i>data</i>, <i>i</i>, <i>elem</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_SET_FOR_EACH_I</b> with each element in <i>set</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition, the auxiliary <i>data</i>, the index of the current element, and the current element.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> for which <i>macro</i> will be invoked on each element.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>), it expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>data</i>, <i>0</i>, <i>a</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>1</i>, <i>b</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>2</i>, <i>c</i>)
</div>
</div>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_FOR_EACH_I_R</a></li>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each_i_r.html">BOOST_PP_SET_FOR_EACH_I_R</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each_i.hpp.html">&lt;boost/preprocessor/set/for_each_i.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/set/for_each_i.hpp.html">boost/preprocessor/set/for_each_i.hpp</a>&gt;
#define SET (a)(b)(c)(d)
#define MACRO(r, data, i, elem) <a href="cat.html">BOOST_PP_CAT</a>(elem, <a href="cat.html">BOOST_PP_CAT</a>(data, i))
<a href="set_for_each_i.html">BOOST_PP_SET_FOR_EACH_I</a>(MACRO, _, SET) // expands to a_0 b_1 c_2 d_3
</pre></div>
</body>
</html>

View File

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH_I_R</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH_I_R</b> macro repeats a macro for each element in a <i>set</i>.&nbsp;
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH_I_R</b>(<i>r</i>, <i>macro</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>r</dt>
<dd>
The next available <b>BOOST_PP_FOR</b> repetition.
</dd>
<dt>macro</dt>
<dd>
A macro of the form <i>macro</i>(<i>r</i>, <i>data</i>, <i>i</i>, <i>elem</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_SET_FOR_EACH_I</b> with each element in <i>set</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition, the auxiliary <i>data</i>, the index of the current element, and the current element.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> for which <i>macro</i> will be invoked on each element.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>), it expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>data</i>, <i>0</i>, <i>a</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>1</i>, <i>b</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>2</i>, <i>c</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each_i.html">BOOST_PP_SET_FOR_EACH_I</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each_i.hpp.html">&lt;boost/preprocessor/set/for_each_i.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,73 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH_PRODUCT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH_PRODUCT</b> macro repeats a macro for each cartesian product of several <i>sets</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH_PRODUCT</b>(<i>macro</i>, <i>sets</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>macro</dt>
<dd>
The binary macro of the form <i>macro</i>(<i>r</i>, <i>product</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_FOR_EACH_PRODUCT</b> with each cartesian product in <i>sets</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition and a <i>set</i> containing a cartesian product.&nbsp;
</dd>
<dt>sets</dt>
<dd>
A <i>set</i> of <i>sets</i> from which cartesian products are obtained.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If two <i>sets</i> are (<i>a</i>)(<i>b</i>)(<i>c</i>) and (<i>x</i>)(<i>y</i>)(<i>z</i>),
this macro will produce the following sequence:
<div>
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>z</i>)) \<br>
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>z</i>)) \<br>
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>z</i>))
</div>
</div>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_FOR_EACH_PRODUCT_R</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each_product_r.html">BOOST_PP_SET_FOR_EACH_PRODUCT_R</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each_product.hpp.html">&lt;boost/preprocessor/set/for_each_product.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/for_each_product.hpp.html">boost/preprocessor/set/for_each_product.hpp</a>&gt;
#include &lt;<a href="../headers/set/to_tuple.hpp.html">boost/preprocessor/set/to_tuple.hpp</a>&gt;
#define S1 (a)(b)(c)
#define S2 (x)(y)(z)
#define S3 (p)(q)
#define MACRO(r, product) <a href="set_to_tuple.html">BOOST_PP_SET_TO_TUPLE</a>(product)
<a href="set_for_each_product.html">BOOST_PP_SET_FOR_EACH_PRODUCT</a>(MACRO, (S1)(S2)(S3))
// expands to:
// (a, x, p) (a, x, q) (a, y, p) (a, y, q) (a, z, p) (a, z, q)
// (b, x, p) (b, x, q) (b, y, p) (b, y, q) (b, z, p) (b, z, q)
// (c, x, p) (c, x, q) (c, y, p) (c, y, q) (c, z, p) (c, z, q)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,58 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH_PRODUCT_R</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH_PRODUCT_R</b> macro repeats a macro for each cartesian product of several <i>sets</i>.&nbsp;
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH_PRODUCT_R</b>(<i>r</i>, <i>macro</i>, <i>sets</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>r</dt>
<dd>
The next available <b>BOOST_PP_FOR</b> repetition.
</dd>
<dt>macro</dt>
<dd>
The binary macro of the form <i>macro</i>(<i>r</i>, <i>product</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_FOR_EACH_PRODUCT</b> with each cartesian product in <i>sets</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition and a <i>set</i> containing a cartesian product.&nbsp;
</dd>
<dt>sets</dt>
<dd>
A <i>set</i> of <i>sets</i> from which cartesian products are obtained.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If two <i>sets</i> are (<i>a</i>)(<i>b</i>)(<i>c</i>) and (<i>x</i>)(<i>y</i>)(<i>z</i>),
this macro will produce the following sequence:
<div>
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>a</i>)(<i>z</i>)) \<br>
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>b</i>)(<i>z</i>)) \<br>
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>x</i>))
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>y</i>))
<i>macro</i>(<i>r</i>, (<i>c</i>)(<i>z</i>))
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each_product.html">BOOST_PP_SET_FOR_EACH_PRODUCT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each_product.hpp.html">&lt;boost/preprocessor/set/for_each_product.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,53 @@
<html>
<head>
<title>BOOST_PP_SET_FOR_EACH_R</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_FOR_EACH_R</b> macro repeats a macro for each element in a <i>set</i>.&nbsp;
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_FOR_EACH_R</b>(<i>r</i>, <i>macro</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>r</dt>
<dd>
The next available <b>BOOST_PP_FOR</b> repetition.
</dd>
<dt>macro</dt>
<dd>
A ternary macro of the form <i>macro</i>(<i>r</i>, <i>data</i>, <i>elem</i>).&nbsp;
This macro is expanded by <b>BOOST_PP_SET_FOR_EACH</b> with each element in <i>set</i>.&nbsp;
It is expanded with the next available <b>BOOST_PP_FOR</b> repetition, the auxiliary <i>data</i>, and the current element.
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>macro</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> for which <i>macro</i> will be invoked on each element.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro is a repetition construct.&nbsp;
If <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>), it expands to the sequence:
<div>
<i>macro</i>(<i>r</i>, <i>data</i>, <i>a</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>b</i>) <i>macro</i>(<i>r</i>, <i>data</i>, <i>c</i>)
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_for_each.html">BOOST_PP_SET_FOR_EACH</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/for_each.hpp.html">&lt;boost/preprocessor/set/for_each.hpp&gt;</a>
</div>
</body>
</html>

39
doc/ref/set_head.html Normal file
View File

@ -0,0 +1,39 @@
<html>
<head>
<title>BOOST_PP_SET_HEAD</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_HEAD</b> macro expands to the first element in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_HEAD</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> from which the first element is extracted.
</dd>
</dl>
<h4>See Also</h4>
<ul>
<li><a href="set_tail.html">BOOST_PP_SET_TAIL</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/set.hpp.html">&lt;boost/preprocessor/set/set.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/set.hpp.html">boost/preprocessor/set/set.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_head.html">BOOST_PP_SET_HEAD</a>(SET) // expands to a
<a href="set_tail.html">BOOST_PP_SET_TAIL</a>(SET) // expands to (b)(c)
</pre></div>
</body>
</html>

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

@ -0,0 +1,47 @@
<html>
<head>
<title>BOOST_PP_SET_INSERT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_INSERT</b> macro inserts an element into an <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_INSERT</b>(<i>set</i>, <i>i</i>, <i>elem</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> into which an element is to be inserted.
</dd>
<dt>i</dt>
<dd>
The zero-based position in <i>set</i> where an element is to be inserted.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_SET_SIZE</b>(<i>set</i>) - <i>1</i>.
</dd>
<dt>elem</dt>
<dd>
The element to insert.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro inserts <i>elem</i> before the element at index <i>i</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/insert.hpp.html">&lt;boost/preprocessor/set/insert.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/insert.hpp.html">boost/preprocessor/set/insert.hpp</a>&gt;
#define SET (a)(b)(d)
<a href="set_insert.html">BOOST_PP_SET_INSERT</a>(SET, 2, c) // expands to (a)(b)(c)(d)
</pre></div>
</body>
</html>

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

@ -0,0 +1,69 @@
<html>
<head>
<title>BOOST_PP_SET_NIL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_NIL</b> macro is a placeholder macro for an empty <i>set</i>.&nbsp;
It is only valid if it is elements are appended to the end of this empty "set."&nbsp;
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_NIL</b>
</div>
<h4>Remarks</h4>
<div>
This macro is a utility macro intended as a empty starting point for appending to the tail.&nbsp;
It is <i>not</i> a nil <i>set</i>.&nbsp;
When an element is appended to this macro, it expands on the element and to the element--thereby removing itself.&nbsp;
For example, both <b>BOOST_PP_SET_NIL</b>(<i>x</i>)
and <b>BOOST_PP_SET_PUSH_BACK</b>(<b>BOOST_PP_SET_NIL</b>, <i>x</i>) expand to <i>x</i>.
</div>
<div>
If any <b>BOOST_PP_SET_</b>* macro (other than <b>BOOST_PP_SET_PUSH_BACK</b>) is invoked with an argument that contains <b>BOOST_PP_SET_NIL</b>,
the behavior is undefined and in most cases will result in obscure errors.
</div>
<div>
The closest thing available to <b>BOOST_PP_SET_NIL</b> for appending to the head is <b>BOOST_PP_EMPTY</b>.&nbsp;
After all the elements have been prepended, empty parenthesis can be invoked on the tail to remove the <b>BOOST_PP_EMPTY</b>.&nbsp;
As with <b>BOOST_PP_SET_NIL</b>, passing an argument that contains <b>BOOST_PP_EMPTY</b> to any <b>BOOST_PP_SET_</b>* macro (other than <b>BOOST_PP_SET_PUSH_FRONT</b>) is undefined.&nbsp;
</div>
<div>
(It is also possible to start with an extra element and pop it off when you have finished appending to it.)
</div>
<div>
In C99, neither of these macros are necessary since it is legal to pass empty arguments.
</div>
<h4>See Also</h4>
<ul>
<li><a href="empty.html">BOOST_PP_EMPTY</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/set.hpp.html">&lt;boost/preprocessor/set/set.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/facilities/empty.hpp.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
#include &lt;<a href="../headers/set/push_back.hpp.html">boost/preprocessor/set/push_back.hpp</a>&gt;
#include &lt;<a href="../headers/set/push_front.hpp.html">boost/preprocessor/set/push_front.hpp</a>&gt;
#include &lt;<a href="../headers/set/set.hpp.html">boost/preprocessor/set/set.hpp</a>&gt;
#define SET_L <a href="set_nil.html">BOOST_PP_SET_NIL</a>
#define SET_R <a href="empty.html">BOOST_PP_EMPTY</a>
<a href="set_push_back.html">BOOST_PP_SET_PUSH_BACK</a>(
<a href="set_push_back.html">BOOST_PP_SET_PUSH_BACK</a>(SET_L, a), b
)
// expands to (a)(b)
<a href="set_push_front.html">BOOST_PP_SET_PUSH_FRONT</a>(
<a href="set_push_front.html">BOOST_PP_SET_PUSH_FRONT</a>(SET_R, a), b
)()
// expands to (b)(a)
</pre></div>
</body>
</html>

42
doc/ref/set_pop_back.html Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<title>BOOST_PP_SET_POP_BACK</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_POP_BACK</b> macro pops an element from the end of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_POP_BACK</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> to pop an element from.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after removing the last element.&nbsp;
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_pop_front.html">BOOST_PP_SET_POP_FRONT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/pop_back.hpp.html">&lt;boost/preprocessor/set/pop_back.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/pop_back.hpp.html">boost/preprocessor/set/pop_back.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_pop_back.html">BOOST_PP_SET_POP_BACK</a>(SET) // expands to (a)(b)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<html>
<head>
<title>BOOST_PP_SET_POP_FRONT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_POP_FRONT</b> macro pops an element from the beginning of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_POP_FRONT</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> to pop an element from.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after removing the first element.&nbsp;
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_pop_back.html">BOOST_PP_SET_POP_BACK</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/pop_front.hpp.html">&lt;boost/preprocessor/set/pop_front.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/pop_front.hpp.html">boost/preprocessor/set/pop_front.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_pop_front.html">BOOST_PP_SET_POP_FRONT</a>(SET) // expands to (b)(c)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,50 @@
<html>
<head>
<title>BOOST_PP_SET_PUSH_BACK</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_PUSH_BACK</b> macro pushes an element onto the end of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_PUSH_BACK</b>(<i>set</i>, <i>elem</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> onto which <i>elem</i> is pushed.
</dd>
<dt>elem</dt>
<dd>
The element to push onto the end of <i>set</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after appending <i>elem</i>.&nbsp;
</div>
<div>
This macro is an explicit form of directly appending an element.&nbsp;
In other words, <b>BOOST_PP_SET_PUSH_BACK</b>(<i>set</i>, <i>x</i>) is equivalent to <i>set</i>(<i>x</i>).
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_push_front.html">BOOST_PP_SET_PUSH_FRONT</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/push_back.hpp.html">&lt;boost/preprocessor/set/push_back.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/push_back.hpp.html">boost/preprocessor/set/push_back.hpp</a>&gt;
#define SET (a)(b)
<a href="set_push_back.html">BOOST_PP_SET_PUSH_BACK</a>(SET, c) // expands to (a)(b)(c)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,50 @@
<html>
<head>
<title>BOOST_PP_SET_PUSH_FRONT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_PUSH_FRONT</b> macro pushes an element onto the beginning of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_PUSH_FRONT</b>(<i>set</i>, <i>elem</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> onto which <i>elem</i> is pushed.
</dd>
<dt>elem</dt>
<dd>
The element to push onto the beginning of <i>set</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after prepending <i>elem</i>.&nbsp;
</div>
<div>
This macro is an explicit form of directly prepending an element.&nbsp;
In other words, <b>BOOST_PP_SET_PUSH_FRONT</b>(<i>set</i>, <i>x</i>) is equivalent to (<i>x</i>)<i>set</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_push_back.html">BOOST_PP_SET_PUSH_BACK</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/push_front.hpp.html">&lt;boost/preprocessor/set/push_front.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/push_front.hpp.html">boost/preprocessor/set/push_front.hpp</a>&gt;
#define SET (b)(c)
<a href="set_push_front.html">BOOST_PP_SET_PUSH_FRONT</a>(SET, a) // expands to (a)(b)(c)
</pre></div>
</body>
</html>

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

@ -0,0 +1,43 @@
<html>
<head>
<title>BOOST_PP_SET_REMOVE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_REMOVE</b> macro removes an element from a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_REMOVE</b>(<i>set</i>, <i>i</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> from which an element is to be removed.
</dd>
<dt>i</dt>
<dd>
The zero-based position in <i>set</i> of the element to be removed.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_SET_SIZE</b>(<i>set</i>) - <i>1</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after removing the element at index <i>i</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/remove.hpp.html">&lt;boost/preprocessor/set/remove.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/remove.hpp.html">boost/preprocessor/set/remove.hpp</a>&gt;
#define SET (a)(b)(x)(c)
<a href="set_remove.html">BOOST_PP_SET_REMOVE</a>(SET, 2) // expands to (a)(b)(c)
</pre></div>
</body>
</html>

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

@ -0,0 +1,47 @@
<html>
<head>
<title>BOOST_PP_SET_REPLACE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_REPLACE</b> macro replaces an element in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_RPLACE</b>(<i>set</i>, <i>i</i>, <i>elem</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> in which an element is to be replaced.
</dd>
<dt>i</dt>
<dd>
The zero-based position in <i>set</i> of the element to be replaced.&nbsp;
Valid values range from <i>0</i> to <b>BOOST_PP_SET_SIZE</b>(<i>set</i>) - <i>1</i>.
</dd>
<dt>elem</dt>
<dd>
The element to replace the element at index <i>i</i> within <i>set</i>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro returns <i>set</i> after replacing the element at index <i>i</i> with <i>elem</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/replace.hpp.html">&lt;boost/preprocessor/set/replace.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/replace.hpp.html">boost/preprocessor/set/replace.hpp</a>&gt;
#define SET (a)(b)(x)(d)
<a href="set_replace.html">BOOST_PP_SET_REPLACE</a>(SET, 2, c) // expands to (a)(b)(c)(d)
</pre></div>
</body>
</html>

92
doc/ref/set_rest_n.html Normal file
View File

@ -0,0 +1,92 @@
<html>
<head>
<title>BOOST_PP_SET_REST_N</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_REST_N</b> macro expands to a <i>set</i> of all but the first <i>n</i> elements of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_REST_N</b>(<i>n</i>, <i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>n</dt>
<dd>
The number of elements to remove.
</dd>
<dt>list</dt>
<dd>
The <i>set</i> from which the elements are to be removed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro extracts <i>n</i> elements from the beginning of <i>set</i> and returns the remainder of <i>set</i> as a new <i>set</i>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_first_n.html">BOOST_PP_SET_FIRST_N</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/rest_n.hpp.html">&lt;boost/preprocessor/set/rest_n.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/set/elem.hpp.html">boost/preprocessor/set/elem.hpp</a>&gt;
#include &lt;<a href="../headers/set/first_n.hpp.html">boost/preprocessor/set/first_n.hpp</a>&gt;
#include &lt;<a href="../headers/set/rest_n.hpp.html">boost/preprocessor/set/rest_n.hpp</a>&gt;
#include &lt;<a href="../headers/set/size.hpp.html">boost/preprocessor/set/size.hpp</a>&gt;
#define NUMBERS \
(0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \
(10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \
(20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \
(30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \
(40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \
(50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \
(60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \
(70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \
(80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \
(90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \
(100)(101)(102)(103)(104)(105)(106)(107)(108)(109) \
(110)(111)(112)(113)(114)(115)(116)(117)(118)(119) \
(120)(121)(122)(123)(124)(125)(126)(127)(128)(129) \
(130)(131)(132)(133)(134)(135)(136)(137)(138)(139) \
(140)(141)(142)(143)(144)(145)(146)(147)(148)(149) \
(150)(151)(152)(153)(154)(155)(156)(157)(158)(159) \
(160)(161)(162)(163)(164)(165)(166)(167)(168)(169) \
(170)(171)(172)(173)(174)(175)(176)(177)(178)(179) \
(180)(181)(182)(183)(184)(185)(186)(187)(188)(189) \
(190)(191)(192)(193)(194)(195)(196)(197)(198)(199) \
(200)(201)(202)(203)(204)(205)(206)(207)(208)(209) \
(210)(211)(212)(213)(214)(215)(216)(217)(218)(219) \
(220)(221)(222)(223)(224)(225)(226)(227)(228)(229) \
(230)(231)(232)(233)(234)(235)(236)(237)(238)(239) \
(240)(241)(242)(243)(244)(245)(246)(247)(248)(249) \
(250)(251)(252)(253)(254)(255)(256) \
/**/
#define SUPER_ADD(x, y) <a href="set_elem.html">BOOST_PP_SET_ELEM</a>(y, <a href="set_rest_n.html">BOOST_PP_SET_REST_N</a>(x, NUMBERS))
SUPER_ADD(100, 100) // expands to 200
#define SUPER_SUB(x, y) \
<a href="set_size.html">BOOST_PP_SET_SIZE</a>( \
<a href="set_rest_n.html">BOOST_PP_SET_REST_N</a>( \
<a href="inc.html">BOOST_PP_INC</a>(y), \
<a href="set_first_n.html">BOOST_PP_SET_FIRST_N</a>( \
<a href="inc.html">BOOST_PP_INC</a>(x), NUMBERS \
) \
) \
) \
/**/
SUPER_SUB(67, 25) // expands to 42
</pre></div>
</body>
</html>

42
doc/ref/set_reverse.html Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<title>BOOST_PP_SET_REVERSE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_REVERSE</b> macro reverses a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_REVERSE</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> to be reversed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_REVERSE_S</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_reverse_s.html">BOOST_PP_SET_REVERSE_S</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/reverse.hpp.html">&lt;boost/preprocessor/set/reverse.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/reverse.hpp.html">boost/preprocessor/set/reverse.hpp</a>&gt;
#define SET (1)(2)(3)
<a href="set_reverse.html">BOOST_PP_SET_REVERSE</a>(SET) // expands to (3)(2)(1)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,35 @@
<html>
<head>
<title>BOOST_PP_SET_REVERSE_S</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_REVERSE_S</b> macro reverses a <i>set</i>.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_LEFT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_REVERSE_S</b>(<i>s</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be reversed.
</dd>
</dl>
<h4>See Also</h4>
<ul>
<li><a href="set_reverse.html">BOOST_PP_SET_REVERSE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/reverse.hpp.html">&lt;boost/preprocessor/set/reverse.hpp&gt;</a>
</div>
</body>
</html>

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

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

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

@ -0,0 +1,46 @@
<html>
<head>
<title>BOOST_PP_SET_SUBSET</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_SUBSET</b> macro expands to a subset of elements in a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_SUBSET</b>(<i>set</i>, <i>i</i>, <i>len</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> whose size is to be calculated.
</dd>
<dt>i</dt>
<dd>
The index of the first element of the subset to be extracted.
</dd>
<dt>len</dt>
<dd>
The length of the subset to be extracted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands to a <i>set</i> extracted from <i>set</i>.
</div>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/subset.hpp.html">&lt;boost/preprocessor/set/subset.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/subset.hpp.html">boost/preprocessor/set/subset.hpp</a>&gt;
#define SET (0)(1)(2)(3)(4)(5)
<a href="set_subset.html">BOOST_PP_SET_SUBSET</a>(SET, 2, 3) // expands to (2)(3)(4)
</pre></div>
</body>
</html>

39
doc/ref/set_tail.html Normal file
View File

@ -0,0 +1,39 @@
<html>
<head>
<title>BOOST_PP_SET_TAIL</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_HEAD</b> macro expands to all but the first element of a <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_TAIL</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> from which the tail is extracted.
</dd>
</dl>
<h4>See Also</h4>
<ul>
<li><a href="set_head.html">BOOST_PP_SET_HEAD</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/set.hpp.html">&lt;boost/preprocessor/set/set.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/set.hpp.html">boost/preprocessor/set/set.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_head.html">BOOST_PP_SET_HEAD</a>(SET) // expands to a
<a href="set_tail.html">BOOST_PP_SET_TAIL</a>(SET) // expands to (b)(c)
</pre></div>
</body>
</html>

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

@ -0,0 +1,34 @@
<html>
<head>
<title>BOOST_PP_SET_TO_ARRAY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_TO_ARRAY</b> macro converts a <i>set</i> to an <i>array</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_TO_ARRAY</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> to be converted.
</dd>
</dl>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/to_array.hpp.html">&lt;boost/preprocessor/set/to_array.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/to_array.hpp.html">boost/preprocessor/set/to_array.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_to_array.html">BOOST_PP_SET_TO_ARRAY</a>(SET) // expands to (3, (a, b, c))
</pre></div>
</body>
</html>

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

@ -0,0 +1,34 @@
<html>
<head>
<title>BOOST_PP_SET_TO_TUPLE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_TO_TUPLE</b> macro converts a <i>set</i> to an <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_TO_TUPLE</b>(<i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>set</dt>
<dd>
The <i>set</i> to be converted.
</dd>
</dl>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/to_tuple.hpp.html">&lt;boost/preprocessor/set/to_tuple.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/set/to_tuple.hpp.html">boost/preprocessor/set/to_tuple.hpp</a>&gt;
#define SET (a)(b)(c)
<a href="set_to_tuple.html">BOOST_PP_SET_TO_TUPLE</a>(SET) // expands to (a, b, c)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,65 @@
<html>
<head>
<title>BOOST_PP_SET_TRANSFORM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_TRANSFORM</b> macro transforms each element in a <i>set</i> according to a supplied transformation.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_TRANSFORM</b>(<i>op</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>op</dt>
<dd>
A ternary predicate of the form <i>op</i>(<i>s</i>, <i>data</i>, <i>elem</i>).&nbsp;
This transformation is expanded by <b>BOOST_PP_SET_TRANSFORM</b> for each element in <i>set</i> with the next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step,
the auxiliary <i>data</i>, and the current element in <i>set</i>.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>pred</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be transformed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands <i>op</i> for each element in <i>set</i>.&nbsp;
It builds a new <i>set</i> out of the results of each call.&nbsp;
If, for example, <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>),
this macro expands to...
<div>
(<i>op</i>(<i>d</i>, <i>data</i>, <i>a</i>))(<i>op</i>(<i>d</i>, <i>data</i>, <i>b</i>))(<i>op</i>(<i>d</i>, <i>data</i>, <i>c</i>))
</div>
</div>
<div>
For maximum efficiency, use <b>BOOST_PP_SET_TRANSFORM_S</b>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_transform_s.html">BOOST_PP_SET_TRANSFORM_S</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/transform.hpp.html">&lt;boost/preprocessor/set/transform.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/set/transform.hpp.html">boost/preprocessor/set/transform.hpp</a>&gt;
#define SET (1)(3)(2)(5)
#define OP(s, data, elem) <a href="dec.html">BOOST_PP_DEC</a>(elem)
<a href="set_transform.html">BOOST_PP_SET_TRANSFORM</a>(OP, 3, SET)
// expands to (0)(2)(1)(4)
</pre></div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<html>
<head>
<title>BOOST_PP_SET_TRANSFORM_S</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_SET_TRANSFORM_S</b> macro transforms each element in a <i>set</i> according to a supplied transformation.&nbsp;
It reenters <b>BOOST_PP_SET_FOLD_LEFT</b> with maximum efficiency.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_SET_TRANSFORM_S</b>(<i>s</i>, <i>op</i>, <i>data</i>, <i>set</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>s</dt>
<dd>
The next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step.
</dd>
<dt>op</dt>
<dd>
A ternary predicate of the form <i>op</i>(<i>s</i>, <i>data</i>, <i>elem</i>).&nbsp;
This transformation is expanded by <b>BOOST_PP_SET_TRANSFORM</b> for each element in <i>set</i> with the next available <b>BOOST_PP_SET_FOLD_LEFT</b> fold step,
the auxiliary <i>data</i>, and the current element in <i>set</i>.&nbsp;
</dd>
<dt>data</dt>
<dd>
Auxiliary data passed to <i>pred</i>.
</dd>
<dt>set</dt>
<dd>
The <i>set</i> to be transformed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
This macro expands <i>op</i> for each element in <i>set</i>.&nbsp;
It builds a new <i>set</i> out of the results of each call.&nbsp;
If, for example, <i>set</i> is (<i>a</i>)(<i>b</i>)(<i>c</i>),
this macro expands to...
<div>
(<i>op</i>(<i>d</i>, <i>data</i>, <i>a</i>))(<i>op</i>(<i>d</i>, <i>data</i>, <i>b</i>))(<i>op</i>(<i>d</i>, <i>data</i>, <i>c</i>))
</div>
</div>
<h4>See Also</h4>
<ul>
<li><a href="set_transform.html">BOOST_PP_SET_TRANSFORM</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/set/transform.hpp.html">&lt;boost/preprocessor/set/transform.hpp&gt;</a>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<html>
<head>
<title>BOOST_PP_TUPLE_REM_CTOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_REM_CTOR</b> macro removes the parentheses from a <i>tuple</i> of the specified size.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_REM_CTOR</b>(<i>size</i>, <i>tuple</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> from which the parentheses are to be removed.&nbsp;
Valid <i>tuple</i> sizes range from <i>0</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> from which the parenthesis are removed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of <i>tuple</i>.
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/rem.hpp.html">&lt;boost/preprocessor/tuple/rem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/tuple/elem.hpp.html">boost/preprocessor/tuple/rem.hpp</a>&gt;
<a href="tuple_rem_ctor.html">BOOST_PP_TUPLE_REM_CTOR</a>(3, (x, y, z)) // expands to x, y, z
</pre></div>
</body>
</html>

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

@ -0,0 +1,36 @@
<html>
<head>
<title>BOOST_PP_TUPLE_TO_SET</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_TO_SET</b> macro converts a <i>tuple</i> to an <i>set</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_TO_SET</b>(<i>size</i>, <i>tuple</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The number of elements in <i>tuple</i>.
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> to be converted.
</dd>
</dl>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/to_set.hpp.html">&lt;boost/preprocessor/tuple/to_set.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/tuple/to_set.hpp.html">boost/preprocessor/tuple/to_set.hpp</a>&gt;
<a href="tuple_to_set.html">BOOST_PP_TUPLE_TO_SET</a>(3, (a, b, c)) // expands to (a)(b)(c)
</pre></div>
</body>
</html>