mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-07-21 08:22:04 +02:00
Added list data structure
[SVN r12433]
This commit is contained in:
@ -27,6 +27,26 @@ BOOST_PP_LESS_EQUAL
|
||||
BOOST_PP_LIMIT_DIM
|
||||
BOOST_PP_LIMIT_MAG
|
||||
BOOST_PP_LIMIT_TUPLE
|
||||
BOOST_PP_LIST_APPEND
|
||||
BOOST_PP_LIST_AT
|
||||
BOOST_PP_LIST_CAT
|
||||
BOOST_PP_LIST_CONS
|
||||
BOOST_PP_LIST_ENUM
|
||||
BOOST_PP_LIST_FILTER
|
||||
BOOST_PP_LIST_FIRST
|
||||
BOOST_PP_LIST_FIRST_N
|
||||
BOOST_PP_LIST_FOLD_LEFT
|
||||
BOOST_PP_LIST_FOLD_RIGHT
|
||||
BOOST_PP_LIST_FOR_EACH
|
||||
BOOST_PP_LIST_IS_CONS
|
||||
BOOST_PP_LIST_IS_NIL
|
||||
BOOST_PP_LIST_NIL
|
||||
BOOST_PP_LIST_REST
|
||||
BOOST_PP_LIST_REST_N
|
||||
BOOST_PP_LIST_REVERSE
|
||||
BOOST_PP_LIST_SIZE
|
||||
BOOST_PP_LIST_TO_TUPLE
|
||||
BOOST_PP_LIST_TRANSFORM
|
||||
BOOST_PP_MAX
|
||||
BOOST_PP_MIN
|
||||
BOOST_PP_MOD
|
||||
@ -42,5 +62,6 @@ BOOST_PP_STRINGIZE
|
||||
BOOST_PP_SUB
|
||||
BOOST_PP_TUPLE_EAT
|
||||
BOOST_PP_TUPLE_ELEM
|
||||
BOOST_PP_TUPLE_TO_LIST
|
||||
BOOST_PP_WHILE
|
||||
BOOST_PP_XOR
|
||||
|
@ -3,6 +3,5 @@ please e-mail such suggestions to boost@yahoogroups.com, but also cc
|
||||
them to vesa_karvonen@hotmail.com.
|
||||
|
||||
Current R&D:
|
||||
- Data structures (cons list)
|
||||
- Faster preprocessing
|
||||
- Faster arithmetic
|
||||
|
244
doc/reference/adt_8hpp.html
Normal file
244
doc/reference/adt_8hpp.html
Normal file
@ -0,0 +1,244 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>adt.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a0">BOOST_PP_LIST_CONS</a>(H, T)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>List constructor.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a1">BOOST_PP_LIST_NIL</a></td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>List nil constructor.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a2">BOOST_PP_LIST_IS_CONS</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to 1 if the list is not nil and 0 otherwise.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a3">BOOST_PP_LIST_IS_NIL</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to 1 if the list is nil and 0 otherwise.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a4">BOOST_PP_LIST_FIRST</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to the first element of the list. The list must not be nil.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="adt_8hpp.html#a5">BOOST_PP_LIST_REST</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to a list of all but the first element of the list. The list must not be nil.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/adt.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
This header defines the fundamental list operations.
|
||||
<p>
|
||||
NOTE: The internal representation of lists is hidden. Although there aren't compelling reasons to change the representation, you should avoid writing code that depends on the internal representation details.
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="adt.hpp::BOOST_PP_LIST_CONS"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_CONS</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">H, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>T </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
List constructor.
|
||||
<p>
|
||||
Lists are build using list constructors BOOST_PP_LIST_NIL and <a class="el" href="adt_8hpp.html#a0">BOOST_PP_LIST_CONS</a>(). For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_CONS(1,
|
||||
BOOST_PP_LIST_CONS(2,
|
||||
BOOST_PP_LIST_CONS(3,
|
||||
BOOST_PP_LIST_CONS(4,
|
||||
BOOST_PP_LIST_CONS(5,
|
||||
BOOST_PP_LIST_NIL)))))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
Short lists can also be build from tuples:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
Both of the above lists contain 5 elements: 1, 2, 3, 4 and 5. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a4" doxytag="adt.hpp::BOOST_PP_LIST_FIRST"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FIRST</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to the first element of the list. The list must not be nil.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_FIRST(BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to 1.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a5">BOOST_PP_LIST_REST</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a2" doxytag="adt.hpp::BOOST_PP_LIST_IS_CONS"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_IS_CONS</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to 1 if the list is not nil and 0 otherwise.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a3">BOOST_PP_LIST_IS_NIL</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a3" doxytag="adt.hpp::BOOST_PP_LIST_IS_NIL"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_IS_NIL</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to 1 if the list is nil and 0 otherwise.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a2">BOOST_PP_LIST_IS_CONS</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a1" doxytag="adt.hpp::BOOST_PP_LIST_NIL"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_NIL
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
List nil constructor.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a0">BOOST_PP_LIST_CONS</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a5" doxytag="adt.hpp::BOOST_PP_LIST_REST"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_REST</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to a list of all but the first element of the list. The list must not be nil.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_REST(BOOST_PP_TUPLE_TO_LIST(5,(1,2,3,4,5)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing 2, 3, 4 and 5.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a4">BOOST_PP_LIST_FIRST</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
66
doc/reference/append_8hpp.html
Normal file
66
doc/reference/append_8hpp.html
Normal file
@ -0,0 +1,66 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>append.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="append_8hpp.html#a0">BOOST_PP_LIST_APPEND</a>(L, P)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Catenates two lists together.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/append.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="append.hpp::BOOST_PP_LIST_APPEND"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_APPEND</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Catenates two lists together.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_APPEND
|
||||
( BOOST_PP_TUPLE_TO_LIST(2,(1,2))
|
||||
, BOOST_PP_TUPLE_TO_LIST(2,(3,4))
|
||||
)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
produces a list containing 1, 2, 3 and 4. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
63
doc/reference/at_8hpp.html
Normal file
63
doc/reference/at_8hpp.html
Normal file
@ -0,0 +1,63 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>at.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="at_8hpp.html#a0">BOOST_PP_LIST_AT</a>(L, I)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to the I:th element of the list L. The first element is at index 0.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/at.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="at.hpp::BOOST_PP_LIST_AT"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_AT</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>I </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to the I:th element of the list L. The first element is at index 0.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)),1)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to B. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -46,7 +46,7 @@
|
||||
<p>
|
||||
Delays the catenation of L and R.
|
||||
<p>
|
||||
Example:
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
#define STATIC_ASSERT(EXPR)\
|
||||
@ -63,7 +63,7 @@ Example:
|
||||
STATIC_ASSERT(sizeof(int) <= sizeof(long));
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
The above expands to:
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
enum
|
||||
|
@ -43,13 +43,13 @@ Expands to a macro that eats a tuple of the specified length.
|
||||
<p>
|
||||
<a class="el" href="eat_8hpp.html#a0">BOOST_PP_TUPLE_EAT</a>() is designed to be used with <a class="el" href="if_8hpp.html#a0">BOOST_PP_IF</a>() like <a class="el" href="empty_8hpp.html#a0">BOOST_PP_EMPTY</a>().
|
||||
<p>
|
||||
For example:
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_IF(0,BOOST_PP_ENUM_PARAMS,BOOST_PP_TUPLE_EAT(2))(10,P)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
The above expands to nothing. </td>
|
||||
expands to nothing. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
@ -49,6 +49,14 @@
|
||||
<p>
|
||||
Expands to the I:th element of an N-tuple.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_TUPLE_ELEM(2,1,(A,B))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to B.
|
||||
<p>
|
||||
Tuples can be used for representing structured data.
|
||||
<p>
|
||||
Examples of tuples:
|
||||
@ -59,15 +67,7 @@ Examples of tuples:
|
||||
4-tuple: (A B C, D, EF, 34)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
Example:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_TUPLE_ELEM(2,1,(A,B))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
The above expands to B.
|
||||
<p>
|
||||
See also BOOST_PP_LIMIT_TUPLE. </td>
|
||||
See BOOST_PP_LIMIT_TUPLE. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a1" doxytag="elem.hpp::BOOST_PREPROCESSOR_TUPLE_ELEM"></a><p>
|
||||
|
@ -8,11 +8,15 @@
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>Boost PREPROCESSOR library: Reference File List</h1>Here is a list of all files with brief descriptions:<table>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="add_8hpp.html">add.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="adt_8hpp.html">adt.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="and_8hpp.html">and.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="append_8hpp.html">append.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="arithmetic_8hpp.html">arithmetic.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="assert__msg_8hpp.html">assert_msg.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="at_8hpp.html">at.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="bool_8hpp.html">bool.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="cat_8hpp.html">cat.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="list_2cat_8hpp.html">list/cat.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="comma_8hpp.html">comma.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="comma__if_8hpp.html">comma_if.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="comparison_8hpp.html">comparison.hpp</a></td><td></td></tr>
|
||||
@ -22,6 +26,7 @@
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="elem_8hpp.html">elem.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="empty_8hpp.html">empty.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="enum_8hpp.html">enum.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="list_2enum_8hpp.html">list/enum.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="enum__params_8hpp.html">enum_params.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="enum_params_with_a_default.htm">enum_params_with_a_default.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="enum_params_with_defaults.htm">enum_params_with_defaults.hpp</a></td><td></td></tr>
|
||||
@ -29,7 +34,12 @@
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="enum__shifted__params_8hpp.html">enum_shifted_params.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="equal_8hpp.html">equal.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="expand_8hpp.html">expand.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="filter_8hpp.html">filter.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="first__n_8hpp.html">first_n.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="fold__left_8hpp.html">fold_left.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="fold__right_8hpp.html">fold_right.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="for_8hpp.html">for.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="for__each_8hpp.html">for_each.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="greater_8hpp.html">greater.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="greater__equal_8hpp.html">greater_equal.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="identity_8hpp.html">identity.hpp</a></td><td></td></tr>
|
||||
@ -38,6 +48,7 @@
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="less_8hpp.html">less.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="less__equal_8hpp.html">less_equal.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="limits_8hpp.html">limits.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="list_8hpp.html">list.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="logical_8hpp.html">logical.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="max_8hpp.html">max.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="min_8hpp.html">min.hpp</a></td><td></td></tr>
|
||||
@ -51,8 +62,14 @@
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="repeat_8hpp.html">repeat.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="repeat__2nd_8hpp.html">repeat_2nd.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="repeat__3rd_8hpp.html">repeat_3rd.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="rest__n_8hpp.html">rest_n.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="reverse_8hpp.html">reverse.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="size_8hpp.html">size.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="stringize_8hpp.html">stringize.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="sub_8hpp.html">sub.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="to__list_8hpp.html">to_list.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="to__tuple_8hpp.html">to_tuple.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="transform_8hpp.html">transform.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="tuple_8hpp.html">tuple.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="while_8hpp.html">while.hpp</a></td><td></td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td><a class="el" href="xor_8hpp.html">xor.hpp</a></td><td></td></tr>
|
||||
|
66
doc/reference/filter_8hpp.html
Normal file
66
doc/reference/filter_8hpp.html
Normal file
@ -0,0 +1,66 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>filter.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="filter_8hpp.html#a0">BOOST_PP_LIST_FILTER</a>(F, P, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to a list containing all the elements X of the list for which F(D,P,X) is true.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/filter.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="filter.hpp::BOOST_PP_LIST_FILTER"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FILTER</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">F, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to a list containing all the elements X of the list for which F(D,P,X) is true.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_FILTER(BOOST_PP_NOT_EQUAL_D,2,BOOST_PP_TUPLE_TO_LIST(3,(1,2,3)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing 1 and 3. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
63
doc/reference/first__n_8hpp.html
Normal file
63
doc/reference/first__n_8hpp.html
Normal file
@ -0,0 +1,63 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>first_n.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="first__n_8hpp.html#a0">BOOST_PP_LIST_FIRST_N</a>(N, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to a list of the first N elements of the list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/first_n.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="first_n.hpp::BOOST_PP_LIST_FIRST_N"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FIRST_N</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">N, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to a list of the first N elements of the list.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_FIRST_N(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing + and -. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
78
doc/reference/fold__left_8hpp.html
Normal file
78
doc/reference/fold__left_8hpp.html
Normal file
@ -0,0 +1,78 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>fold_left.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="fold__left_8hpp.html#a0">BOOST_PP_LIST_FOLD_LEFT</a>(F, P, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Iterates F(D,P,X) for each element X of the list L (from the left or the start of the list).</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/fold_left.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="fold_left.hpp::BOOST_PP_LIST_FOLD_LEFT"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FOLD_LEFT</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">F, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Iterates F(D,P,X) for each element X of the list L (from the left or the start of the list).
|
||||
<p>
|
||||
In other words,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_FOLD_LEFT(F,P,L)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
F
|
||||
( D
|
||||
, ... F(D, F(D,P,BOOST_PP_LIST_AT(L,0)), BOOST_PP_LIST_AT(L,1)) ...
|
||||
, BOOST_PP_LIST_AT(L,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L))
|
||||
)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
Note that folding, or accumulation, is a very general pattern of computation. Most list operations can implemented in terms of folding.
|
||||
<p>
|
||||
See <a class="el" href="fold__right_8hpp.html#a0">BOOST_PP_LIST_FOLD_RIGHT</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
84
doc/reference/fold__right_8hpp.html
Normal file
84
doc/reference/fold__right_8hpp.html
Normal file
@ -0,0 +1,84 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>fold_right.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="fold__right_8hpp.html#a0">BOOST_PP_LIST_FOLD_RIGHT</a>(F, L, P)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Iterates F(D,X,P) for each element X of the list L (from the right or the end of the list).</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/fold_right.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="fold_right.hpp::BOOST_PP_LIST_FOLD_RIGHT"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FOLD_RIGHT</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">F, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Iterates F(D,X,P) for each element X of the list L (from the right or the end of the list).
|
||||
<p>
|
||||
In other words,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_FOLD_RIGHT(F,L,P)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
F
|
||||
( D
|
||||
, BOOST_PP_LIST_AT(L,0)
|
||||
, ... F
|
||||
( D
|
||||
, BOOST_PP_LIST_AT(L,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(L),2))
|
||||
, F
|
||||
( D
|
||||
, BOOST_PP_LIST_AT(L,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(L),1))
|
||||
, P
|
||||
)
|
||||
) ...
|
||||
)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
See <a class="el" href="fold__left_8hpp.html#a0">BOOST_PP_LIST_FOLD_LEFT</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -69,7 +69,17 @@ The length of the sequence is determined by C(R,X).
|
||||
<p>
|
||||
<b>I</b> is the state instantiation macro.
|
||||
<p>
|
||||
<b>R</b> is the recursion depth and should only be used as a parameter to other macros implemented using <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() or for invoking BOOST_PP_FOR#R() directly. For each macro implemented using <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>(), there is a version of the macro, distinguished by the _R suffix, that accepts an additional recursion depth as the first parameter. This technique is necessary to avoid recursively expanding the same macro again, which is not permitted by the C/C++ preprocessor. </td>
|
||||
<b>R</b> is the recursion depth and should only be used as a parameter to other macros implemented using <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() or for invoking BOOST_PP_FOR#R() directly. For each macro implemented using <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>(), there is a version of the macro, distinguished by the _R suffix, that accepts an additional recursion depth as the first parameter. This technique is necessary to avoid recursively expanding the same macro again, which is not permitted by the C++ preprocessor.
|
||||
<p>
|
||||
<h3><a class="el" href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() vs <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>()</h3>
|
||||
|
||||
<p>
|
||||
<a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() is a generalization of <a class="el" href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>(). This means that <a class="el" href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() can be implemented using <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>(). Unfortunately, <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() is slower than <a class="el" href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>(). In addition, <a class="el" href="repeat_8hpp.html#a0">BOOST_PP_REPEAT</a>() was introduced earlier, is generally easier to use, and is still quite useful on its own.
|
||||
<p>
|
||||
<h3>2D and 3D repetition</h3>
|
||||
|
||||
<p>
|
||||
<a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() can be used for multidimensional repetition simply by invoking BOOST_PP_FOR#R() directly. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
69
doc/reference/for__each_8hpp.html
Normal file
69
doc/reference/for__each_8hpp.html
Normal file
@ -0,0 +1,69 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>for_each.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="for__each_8hpp.html#a0">BOOST_PP_LIST_FOR_EACH</a>(F, P, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Repeats F(R,P,<a class="el" href="at_8hpp.html#a0">BOOST_PP_LIST_AT</a>(L,I)) for each I = [0,<a class="el" href="size_8hpp.html#a0">BOOST_PP_LIST_SIZE</a>(L)[.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/for_each.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="for_each.hpp::BOOST_PP_LIST_FOR_EACH"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_FOR_EACH</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">F, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Repeats F(R,P,<a class="el" href="at_8hpp.html#a0">BOOST_PP_LIST_AT</a>(L,I)) for each I = [0,<a class="el" href="size_8hpp.html#a0">BOOST_PP_LIST_SIZE</a>(L)[.
|
||||
<p>
|
||||
In other words, expands to the sequence:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
F(R,P,BOOST_PP_LIST_AT(L,0))
|
||||
F(R,P,BOOST_PP_LIST_AT(L,1))
|
||||
...
|
||||
F(R,P,BOOST_PP_LIST_AT(L,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L))))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
See <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>() for an explanation of the R parameter. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -36,7 +36,27 @@
|
||||
: <a class="el" href="less__equal_8hpp.html#a0">less_equal.hpp</a><li>BOOST_PP_LIMIT_DIM
|
||||
: <a class="el" href="limits_8hpp.html#a0">limits.hpp</a><li>BOOST_PP_LIMIT_MAG
|
||||
: <a class="el" href="limits_8hpp.html#a1">limits.hpp</a><li>BOOST_PP_LIMIT_TUPLE
|
||||
: <a class="el" href="limits_8hpp.html#a2">limits.hpp</a><li>BOOST_PP_MAX
|
||||
: <a class="el" href="limits_8hpp.html#a2">limits.hpp</a><li>BOOST_PP_LIST_APPEND
|
||||
: <a class="el" href="append_8hpp.html#a0">append.hpp</a><li>BOOST_PP_LIST_AT
|
||||
: <a class="el" href="at_8hpp.html#a0">at.hpp</a><li>BOOST_PP_LIST_CAT
|
||||
: <a class="el" href="list_2cat_8hpp.html#a0">list/cat.hpp</a><li>BOOST_PP_LIST_CONS
|
||||
: <a class="el" href="adt_8hpp.html#a0">adt.hpp</a><li>BOOST_PP_LIST_ENUM
|
||||
: <a class="el" href="list_2enum_8hpp.html#a0">list/enum.hpp</a><li>BOOST_PP_LIST_FILTER
|
||||
: <a class="el" href="filter_8hpp.html#a0">filter.hpp</a><li>BOOST_PP_LIST_FIRST
|
||||
: <a class="el" href="adt_8hpp.html#a4">adt.hpp</a><li>BOOST_PP_LIST_FIRST_N
|
||||
: <a class="el" href="first__n_8hpp.html#a0">first_n.hpp</a><li>BOOST_PP_LIST_FOLD_LEFT
|
||||
: <a class="el" href="fold__left_8hpp.html#a0">fold_left.hpp</a><li>BOOST_PP_LIST_FOLD_RIGHT
|
||||
: <a class="el" href="fold__right_8hpp.html#a0">fold_right.hpp</a><li>BOOST_PP_LIST_FOR_EACH
|
||||
: <a class="el" href="for__each_8hpp.html#a0">for_each.hpp</a><li>BOOST_PP_LIST_IS_CONS
|
||||
: <a class="el" href="adt_8hpp.html#a2">adt.hpp</a><li>BOOST_PP_LIST_IS_NIL
|
||||
: <a class="el" href="adt_8hpp.html#a3">adt.hpp</a><li>BOOST_PP_LIST_NIL
|
||||
: <a class="el" href="adt_8hpp.html#a1">adt.hpp</a><li>BOOST_PP_LIST_REST
|
||||
: <a class="el" href="adt_8hpp.html#a5">adt.hpp</a><li>BOOST_PP_LIST_REST_N
|
||||
: <a class="el" href="rest__n_8hpp.html#a0">rest_n.hpp</a><li>BOOST_PP_LIST_REVERSE
|
||||
: <a class="el" href="reverse_8hpp.html#a0">reverse.hpp</a><li>BOOST_PP_LIST_SIZE
|
||||
: <a class="el" href="size_8hpp.html#a0">size.hpp</a><li>BOOST_PP_LIST_TO_TUPLE
|
||||
: <a class="el" href="to__tuple_8hpp.html#a0">to_tuple.hpp</a><li>BOOST_PP_LIST_TRANSFORM
|
||||
: <a class="el" href="transform_8hpp.html#a0">transform.hpp</a><li>BOOST_PP_MAX
|
||||
: <a class="el" href="max_8hpp.html#a0">max.hpp</a><li>BOOST_PP_MIN
|
||||
: <a class="el" href="min_8hpp.html#a0">min.hpp</a><li>BOOST_PP_MOD
|
||||
: <a class="el" href="mod_8hpp.html#a0">mod.hpp</a><li>BOOST_PP_MUL
|
||||
@ -51,7 +71,8 @@
|
||||
: <a class="el" href="stringize_8hpp.html#a0">stringize.hpp</a><li>BOOST_PP_SUB
|
||||
: <a class="el" href="sub_8hpp.html#a0">sub.hpp</a><li>BOOST_PP_TUPLE_EAT
|
||||
: <a class="el" href="eat_8hpp.html#a0">eat.hpp</a><li>BOOST_PP_TUPLE_ELEM
|
||||
: <a class="el" href="elem_8hpp.html#a0">elem.hpp</a><li>BOOST_PP_WHILE
|
||||
: <a class="el" href="elem_8hpp.html#a0">elem.hpp</a><li>BOOST_PP_TUPLE_TO_LIST
|
||||
: <a class="el" href="to__list_8hpp.html#a0">to_list.hpp</a><li>BOOST_PP_WHILE
|
||||
: <a class="el" href="while_8hpp.html#a0">while.hpp</a><li>BOOST_PP_XOR
|
||||
: <a class="el" href="xor_8hpp.html#a0">xor.hpp</a><li>BOOST_PREPROCESSOR_ADD
|
||||
: <a class="el" href="add_8hpp.html#a1">add.hpp</a><li>BOOST_PREPROCESSOR_AND
|
||||
|
@ -45,14 +45,14 @@ Expands to X once invoked.
|
||||
<p>
|
||||
Designed to be used with <a class="el" href="if_8hpp.html#a0">BOOST_PP_IF</a>(), when one of the clauses need to be invoked.
|
||||
<p>
|
||||
Example:
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_IDENTITY(X)()
|
||||
// ^^ NOTE!
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
The above expands to:
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
X
|
||||
|
60
doc/reference/list_2cat_8hpp.html
Normal file
60
doc/reference/list_2cat_8hpp.html
Normal file
@ -0,0 +1,60 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>cat.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="list_2cat_8hpp.html#a0">BOOST_PP_LIST_CAT</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Catenates all elements of the list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/cat.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="list/cat.hpp::BOOST_PP_LIST_CAT"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_CAT</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Catenates all elements of the list.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(3,(1,2,3)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to 123. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
64
doc/reference/list_2enum_8hpp.html
Normal file
64
doc/reference/list_2enum_8hpp.html
Normal file
@ -0,0 +1,64 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>enum.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="list_2enum_8hpp.html#a0">BOOST_PP_LIST_ENUM</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Converts the list to a comma separated list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/enum.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="list/enum.hpp::BOOST_PP_LIST_ENUM"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_ENUM</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Converts the list to a comma separated list.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
A, B, C
|
||||
</pre></div></pre> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
23
doc/reference/list_8hpp.html
Normal file
23
doc/reference/list_8hpp.html
Normal file
@ -0,0 +1,23 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>list.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
Includes all list headers.
|
||||
<p>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -55,7 +55,59 @@ In other words, expands to the sequence:
|
||||
M(0,P) M(1,P) ... M(N-1,P)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
See BOOST_PP_LIMIT_MAG. </td>
|
||||
See BOOST_PP_LIMIT_MAG.
|
||||
<p>
|
||||
<h3>2D and 3D repetition</h3>
|
||||
|
||||
<p>
|
||||
2D and 3D repetition are supported with the <a class="el" href="repeat__2nd_8hpp.html#a0">BOOST_PP_REPEAT_2ND</a>() and <a class="el" href="repeat__3rd_8hpp.html#a0">BOOST_PP_REPEAT_3RD</a>() macros. For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
// A generalized macro for generating 2D arrays
|
||||
#define ARRAY_2D(W,H,M,P)\
|
||||
BOOST_PP_REPEAT_2ND\
|
||||
( H\
|
||||
, ARRAY_2D_ROW\
|
||||
, (W,H,M,P)\
|
||||
)
|
||||
#define ARRAY_2D_ROW(Y,WHMP)\
|
||||
BOOST_PP_EXPAND\
|
||||
( BOOST_PP_REPEAT\
|
||||
( BOOST_PP_TUPLE_ELEM(4,0,WHMP)\
|
||||
, ARRAY_2D_ELEM\
|
||||
, (Y,BOOST_PP_TUPLE4_ENUM WHMP)\
|
||||
)\
|
||||
)
|
||||
#define BOOST_PP_TUPLE4_ENUM(A,B,C,D) A,B,C,D
|
||||
#define ARRAY_2D_ELEM(X,YWHMP)\
|
||||
BOOST_PP_TUPLE_ELEM(5,3,YWHMP)\
|
||||
BOOST_PP_EXPAND\
|
||||
( ( X\
|
||||
, BOOST_PP_TUPLE_ELEM(5,0,YWHMP)\
|
||||
, BOOST_PP_TUPLE_ELEM(5,1,YWHMP)\
|
||||
, BOOST_PP_TUPLE_ELEM(5,2,YWHMP)\
|
||||
, BOOST_PP_TUPLE_ELEM(5,4,YWHMP)\
|
||||
)\
|
||||
)
|
||||
|
||||
// Here we use the above macro to generate something
|
||||
#define ELEM(X,Y,W,H,E) BOOST_PP_COMMA_IF(BOOST_PP_OR(X,Y)) E##_##X##_##Y
|
||||
|
||||
ARRAY_2D(3,4,ELEM,elem)
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
elem_0_0, elem_1_0, elem_2_0,
|
||||
elem_0_1, elem_1_1, elem_2_1,
|
||||
elem_0_2, elem_1_2, elem_2_2,
|
||||
elem_0_3, elem_1_3, elem_2_3
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
Since recursive expansion of macros is not allowed by the C++ preprocessor, replacing the BOOST_PP_REPEAT_2ND above with BOOST_PP_REPEAT, would not produce the above expansion.
|
||||
<p>
|
||||
See <a class="el" href="for_8hpp.html#a0">BOOST_PP_FOR</a>(). </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="a1" doxytag="repeat.hpp::BOOST_PREPROCESSOR_REPEAT"></a><p>
|
||||
|
63
doc/reference/rest__n_8hpp.html
Normal file
63
doc/reference/rest__n_8hpp.html
Normal file
@ -0,0 +1,63 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>rest_n.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="rest__n_8hpp.html#a0">BOOST_PP_LIST_REST_N</a>(N, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to a list of all but the first N elements of the list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/rest_n.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="rest_n.hpp::BOOST_PP_LIST_REST_N"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_REST_N</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">N, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to a list of all but the first N elements of the list.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_REST_N(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing * and /. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
60
doc/reference/reverse_8hpp.html
Normal file
60
doc/reference/reverse_8hpp.html
Normal file
@ -0,0 +1,60 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>reverse.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="reverse_8hpp.html#a0">BOOST_PP_LIST_REVERSE</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>List reversal.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/reverse.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="reverse.hpp::BOOST_PP_LIST_REVERSE"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_REVERSE</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
List reversal.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_REVERSE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing C, B and A. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
60
doc/reference/size_8hpp.html
Normal file
60
doc/reference/size_8hpp.html
Normal file
@ -0,0 +1,60 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>size.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="size_8hpp.html#a0">BOOST_PP_LIST_SIZE</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Expands to the number of elements in the list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/size.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="size.hpp::BOOST_PP_LIST_SIZE"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_SIZE</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Expands to the number of elements in the list.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_SIZE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to 3. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -43,7 +43,7 @@
|
||||
<p>
|
||||
Delays the stringization of E.
|
||||
<p>
|
||||
Example:
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
#define NOTE(STR)\
|
||||
@ -54,7 +54,7 @@ Example:
|
||||
#pragma NOTE("TBD!")
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
The above expands to:
|
||||
expands to:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
#pragma message("examples.cpp" "(" "20" ") : " "TBD!")
|
||||
|
59
doc/reference/to__list_8hpp.html
Normal file
59
doc/reference/to__list_8hpp.html
Normal file
@ -0,0 +1,59 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>to_list.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="to__list_8hpp.html#a0">BOOST_PP_TUPLE_TO_LIST</a>(N, T)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Converts a tuple to a list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/tuple/to_list.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="to_list.hpp::BOOST_PP_TUPLE_TO_LIST"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_TUPLE_TO_LIST</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">N, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>T </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Converts a tuple to a list.
|
||||
<p>
|
||||
See <a class="el" href="adt_8hpp.html#a0">BOOST_PP_LIST_CONS</a>() for an example.
|
||||
<p>
|
||||
See BOOST_PP_LIMIT_TUPLE. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
62
doc/reference/to__tuple_8hpp.html
Normal file
62
doc/reference/to__tuple_8hpp.html
Normal file
@ -0,0 +1,62 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>to_tuple.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="to__tuple_8hpp.html#a0">BOOST_PP_LIST_TO_TUPLE</a>(L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Converts the list to a tuple.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/to_tuple.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="to_tuple.hpp::BOOST_PP_LIST_TO_TUPLE"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_TO_TUPLE</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Converts the list to a tuple.
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_TO_TUPLE(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to (A,B,C).
|
||||
<p>
|
||||
NOTE: The supported size of the list being converted to a tuple is limited by BOOST_PP_LIMIT_MAG rather than BOOST_PP_LIMIT_TUPLE. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
76
doc/reference/transform_8hpp.html
Normal file
76
doc/reference/transform_8hpp.html
Normal file
@ -0,0 +1,76 @@
|
||||
<a href="../index.htm"><IMG height=86
|
||||
alt="c++boost.gif (8819 bytes)"
|
||||
src="../../../../c++boost.gif"
|
||||
width=277 align=center></a>
|
||||
<hr>
|
||||
<!-- Generated by Doxygen 1.2.13 -->
|
||||
<center>
|
||||
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
||||
<hr><h1>transform.hpp File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
||||
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="transform_8hpp.html#a0">BOOST_PP_LIST_TRANSFORM</a>(F, P, L)</td></tr>
|
||||
<tr><td> </td><td><font size=-1><em>Applies the macro F(D,P,X) to each element X of the list producing a new list.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
<a href="../../../../boost/preprocessor/list/transform.hpp">Click here to see the header.</a>
|
||||
<p>
|
||||
<hr><h2>Define Documentation</h2>
|
||||
<a name="a0" doxytag="transform.hpp::BOOST_PP_LIST_TRANSFORM"></a><p>
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> #define BOOST_PP_LIST_TRANSFORM</td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">F, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>P, <tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>L </td>
|
||||
<td class="mdname1" valign="top" nowrap> </td>
|
||||
<td class="md" valign="top">) </td>
|
||||
<td class="md" nowrap>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Applies the macro F(D,P,X) to each element X of the list producing a new list.
|
||||
<p>
|
||||
In other words, <a class="el" href="transform_8hpp.html#a0">BOOST_PP_LIST_TRANSFORM</a>(F,P,L) expands to same as:
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_CONS(F(D,P,BOOST_PP_LIST_AT(L,0)),
|
||||
BOOST_PP_LIST_CONS(F(D,P,BOOST_PP_LIST_AT(L,1)),
|
||||
...
|
||||
BOOST_PP_LIST_CONS(F(D,P,BOOST_PP_LIST_AT(L,BOOST_PP_DEC(BOOST_PP_LIST_SIZE(L)))),
|
||||
BOOST_PP_LIST_NIL) ... ))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
For example,
|
||||
<p>
|
||||
<pre><div class="fragment"><pre>
|
||||
BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D,2,BOOST_PP_TUPLE_TO_LIST(2,(1,2)))
|
||||
</pre></div></pre>
|
||||
<p>
|
||||
expands to a list containing 3 and 4. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
||||
<p>Permission to copy, use, modify, sell and distribute this document is granted
|
||||
provided this copyright notice appears in all copies. This document is provided
|
||||
"as is" without express or implied warranty, and with no claim as to its suitability
|
||||
for any purpose. </p>
|
||||
|
||||
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|
@ -56,14 +56,14 @@ Iterates F(D,X) while C(D,X) is true.
|
||||
<p>
|
||||
<b>F</b> is the iterated macro. Note that if the state is a tuple, then F(D,X) usually expands to a tuple of the same number of elements.
|
||||
<p>
|
||||
<b>D</b> is the recursion depth and should only be used as a parameter to other macros implemented using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>(). Such macros include <a class="el" href="add_8hpp.html#a0">BOOST_PP_ADD</a>() and other arithmetic operations. For each macro implemented using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>(), there is a version of the macro, distinguished by the _D suffix (e.g. BOOST_PP_ADD_D()), that accepts an additional recursion depth as the first parameter. This technique is necessary to avoid recursively expanding the same macro again, which is not permitted by the C/C++ preprocessor.
|
||||
<b>D</b> is the recursion depth and should only be used as a parameter to other macros implemented using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>(). Such macros include <a class="el" href="add_8hpp.html#a0">BOOST_PP_ADD</a>() and other arithmetic operations. For each macro implemented using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>(), there is a version of the macro, distinguished by the _D suffix (e.g. BOOST_PP_ADD_D()), that accepts an additional recursion depth as the first parameter. This technique is necessary to avoid recursively expanding the same macro again, which is not permitted by the C++ preprocessor.
|
||||
<p>
|
||||
NOTE: The value of the D parameter may exceed BOOST_PP_LIMIT_MAG.
|
||||
<p>
|
||||
<h3>Usage</h3>
|
||||
|
||||
<p>
|
||||
Using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>() is a bit tricky. This is due to the C/C++ preprocessor limitations. It is recommended to take a look at the implementations of the various PREPROCESSOR library primitives such as <a class="el" href="add_8hpp.html#a0">BOOST_PP_ADD</a>() for additional examples.
|
||||
Using <a class="el" href="while_8hpp.html#a0">BOOST_PP_WHILE</a>() is a bit tricky. This is due to the C++ preprocessor limitations. It is recommended to take a look at the implementations of the various PREPROCESSOR library primitives such as <a class="el" href="add_8hpp.html#a0">BOOST_PP_ADD</a>() for additional examples.
|
||||
<p>
|
||||
Here is a trivial example that simply counts down from N to 0 ultimately expanding to a 0:
|
||||
<p>
|
||||
@ -99,7 +99,7 @@ For a more complex example, let's take a look at an implementation of <a class="
|
||||
// element of the tuple is the result.
|
||||
//
|
||||
// #2) The WHILE primitive is "invoked" directly. BOOST_PP_WHILE(D,...)
|
||||
// can't be used because it would not be expanded by the C preprocessor.
|
||||
// can't be used because it would not be expanded by the C++ preprocessor.
|
||||
//
|
||||
// #3) ???_C is the condition and ???_F is the iteration macro.
|
||||
|
||||
|
Reference in New Issue
Block a user