forked from boostorg/preprocessor
Merge branch 'develop'
This commit is contained in:
2494
doc/Appendix A An Introduction to Preprocessor Metaprogramming.html
Normal file
2494
doc/Appendix A An Introduction to Preprocessor Metaprogramming.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,38 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>contents.html</title>
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<title>contents.html</title>
|
||||||
<style>
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
|
<style>
|
||||||
a, a:link, a:visited { color: black; font-weight: bold; }
|
a, a:link, a:visited { color: black; font-weight: bold; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h4><a href="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming.html"
|
||||||
<h4><a href="http://www.boostpro.com/mplbook/preprocessor.html" target="_top">Introduction</a></h4>
|
target="_top">Introduction</a></h4>
|
||||||
<h4><a href="topics.html">Topics</h4>
|
<h4><a href="topics.html">Topics</a></h4>
|
||||||
<h4><a href="terms.html">Terminology</h4>
|
<a href="topics.html">
|
||||||
<h4><a href="data.html">Data Types</h4>
|
</a>
|
||||||
<h4><a href="ref.html">Reference</h4>
|
<h4><a href="topics.html"></a><a href="terms.html">Terminology</a></h4>
|
||||||
<h4><a href="headers.html">Headers</h4>
|
<a href="terms.html">
|
||||||
<h4><a href="examples.html">Examples</h4>
|
</a>
|
||||||
<h4><a href="miscellanea.html">Miscellanea</h4>
|
<h4><a href="terms.html"></a><a href="data.html">Data Types</a></h4>
|
||||||
|
<a href="data.html">
|
||||||
<!--
|
</a>
|
||||||
<EFBFBD> Copyright Housemarque Oy 2002
|
<h4><a href="data.html"></a><a href="ref.html">Reference</a></h4>
|
||||||
<EFBFBD> Copyright Paul Mensonides 2002
|
<a href="ref.html">
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
</a>
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
<h4><a href="ref.html"></a><a href="headers.html">Headers</a></h4>
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
<a href="headers.html">
|
||||||
-->
|
</a>
|
||||||
|
<h4><a href="headers.html"></a><a href="examples.html">Examples</a></h4>
|
||||||
</body>
|
<a href="examples.html">
|
||||||
</html>
|
</a>
|
||||||
|
<h4><a href="examples.html"></a><a href="miscellanea.html">Miscellanea</a></h4>
|
||||||
|
<a href="miscellanea.html">
|
||||||
|
<!--
|
||||||
|
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
|
||||||
|
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
http://www.boost.org/LICENSE_1_0.txt)--> </a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>arrays.html</title>
|
<title>arrays.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
@ -17,12 +18,19 @@
|
|||||||
size. It only requires that an element exists at a certain index. </div>
|
size. It only requires that an element exists at a certain index. </div>
|
||||||
<div> This allows macro parameters to be variable in size and allows data
|
<div> This allows macro parameters to be variable in size and allows data
|
||||||
states to change size without the user explicitly keeping track of the
|
states to change size without the user explicitly keeping track of the
|
||||||
size independently.</div>
|
size independently.<br>
|
||||||
|
<br>
|
||||||
|
An <i>array </i>can be empty and have no elements. An empty array has a
|
||||||
|
0 size. The notation for an empty array is '(0,())'.<br>
|
||||||
|
<br>
|
||||||
|
<span style="font-style: italic;"> </span></div>
|
||||||
<div>With variadic macro support a <i>tuple </i>has all of the
|
<div>With variadic macro support a <i>tuple </i>has all of the
|
||||||
functionality as an <i>array</i>, knows its own size, and is easier
|
functionality as an <i>array</i>, knows its own size, and is easier
|
||||||
syntactically to use. Because of that an <i>array</i> should be used, as
|
syntactically to use. Because of that an <i>array</i> should be used, as
|
||||||
opposed to a <i>tuple</i>, only if your compiler does not support
|
opposed to a <i>tuple</i>, only if your compiler does not support
|
||||||
variadic macros.<br>
|
variadic macros. The only advantage an <i>array </i>has over a <i>tuple
|
||||||
|
</i>is that an <i>array </i>can be empty while a <i>tuple </i>always
|
||||||
|
has at least one element and therefore can never have a size of 0.<br>
|
||||||
<br>
|
<br>
|
||||||
Elements of an <i>array</i> can be extracted with <b>BOOST_PP_ARRAY_ELEM</b>,
|
Elements of an <i>array</i> can be extracted with <b>BOOST_PP_ARRAY_ELEM</b>,
|
||||||
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>,
|
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>,
|
||||||
|
@ -1,46 +1,42 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>lists.html</title>
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<title>lists.html</title>
|
||||||
</head>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<body>
|
</head>
|
||||||
<h4>Lists</h4>
|
<body>
|
||||||
<div>
|
<h4>Lists</h4>
|
||||||
A <i>list</i> is a simple cons-style list with a head and a tail.
|
<div> A <i>list</i> is a simple cons-style list with a head and a
|
||||||
The head of a <i>list</i> is an element,
|
tail. The head of a <i>list</i> is an element, and the tail is
|
||||||
and the tail is either another <i>list</i> or <b>BOOST_PP_NIL</b>.
|
either another <i>list</i> or <b>BOOST_PP_NIL</b>. For example, </div>
|
||||||
For example,
|
<div class="code"> (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>)))
|
||||||
</div>
|
</div>
|
||||||
<div class="code">
|
<div> ...is a <i>list</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||||
(<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>)))
|
</div>
|
||||||
</div>
|
<div> This allows macro parameters to be variable in size and allows data
|
||||||
<div>
|
states to change size without the user explicitly keeping track of the
|
||||||
...is a <i>list</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
size independently.<br>
|
||||||
</div>
|
<br>
|
||||||
<div>
|
A list can be empty and therefore have a size of 0. An empty list is
|
||||||
This allows macro parameters to be variable in size and allows data states to change
|
represented by the notation <b>BOOST_PP_NIL.<br>
|
||||||
size without the user explicitly keeping track of the size independently.
|
<br>
|
||||||
</div>
|
</b></div>
|
||||||
<div>
|
<div> Elements of a <i>list</i> can be extracted with <b>BOOST_PP_LIST_FIRST</b>
|
||||||
Elements of a <i>list</i> can be extracted with
|
and <b>BOOST_PP_LIST_REST</b>. </div>
|
||||||
<b>BOOST_PP_LIST_FIRST</b> and <b>BOOST_PP_LIST_REST</b>.
|
<h4>Primitives</h4>
|
||||||
</div>
|
<ul>
|
||||||
<h4>Primitives</h4>
|
<li><a href="../ref/list_first.html">BOOST_PP_LIST_FIRST</a></li>
|
||||||
<ul>
|
<li><a href="../ref/list_rest.html">BOOST_PP_LIST_REST</a></li>
|
||||||
<li><a href="../ref/list_first.html">BOOST_PP_LIST_FIRST</a></li>
|
<li><a href="../ref/nil.html">BOOST_PP_NIL</a></li>
|
||||||
<li><a href="../ref/list_rest.html">BOOST_PP_LIST_REST</a></li>
|
</ul>
|
||||||
<li><a href="../ref/nil.html">BOOST_PP_NIL</a></li>
|
<hr size="1">
|
||||||
</ul>
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<hr size="1">
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
<div style="margin-left: 0px;">
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
<div style="margin-left: 0px;">
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||||
</div>
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
<div style="margin-left: 0px;">
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
</div>
|
||||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
</body>
|
||||||
copy at <a href=
|
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,30 +1,23 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>sequences.html</title>
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<title>sequences.html</title>
|
||||||
</head>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<body>
|
</head>
|
||||||
<h4>
|
<body>
|
||||||
Sequences
|
<h4> Sequences </h4>
|
||||||
</h4>
|
<div> A <i>sequence</i> (abbreviated to <i>seq</i>) is a group of adjacent
|
||||||
<div>
|
parenthesized elements. For example, </div>
|
||||||
A <i>sequence</i> (abbreviated to <i>seq</i>) is a group of adjacent parenthesized elements. For example,
|
<div class="code"> (<i>a</i>)(<i>b</i>)(<i>c</i>) </div>
|
||||||
</div>
|
<div> ...is a <i>seq</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||||
<div class="code">
|
</div>
|
||||||
(<i>a</i>)(<i>b</i>)(<i>c</i>)
|
<div> <i>Sequences</i> are data structures that merge the properties of
|
||||||
</div>
|
both <i>lists</i> and <i>tuples</i> with the exception that a <i>seq, </i>like
|
||||||
<div>
|
a <i>tuple, </i>cannot be empty. Therefore, an "empty" <i>seq</i>
|
||||||
...is a <i>seq</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
is considered a special case scenario that must be handled separately in
|
||||||
</div>
|
C++. </div>
|
||||||
<div>
|
<div class="code">
|
||||||
<i>Sequences</i> are data structures that merge the properties of both <i>lists</i> and
|
<pre>#define SEQ (x)(y)(z)
|
||||||
<i>tuples</i> with the exception that a <i>seq</i> cannot be empty.
|
|
||||||
Therefore, an "empty" <i>seq</i> is considered a special case scenario that
|
|
||||||
must be handled separately in C++.
|
|
||||||
</div>
|
|
||||||
<div class="code">
|
|
||||||
<pre>
|
|
||||||
#define SEQ (x)(y)(z)
|
|
||||||
#define REVERSE(s, state, elem) (elem) state
|
#define REVERSE(s, state, elem) (elem) state
|
||||||
// append to head ^
|
// append to head ^
|
||||||
|
|
||||||
@ -41,35 +34,27 @@ BOOST_PP_SEQ_FOLD_RIGHT(INC, BOOST_PP_SEQ_NIL, SEQ)
|
|||||||
// ^
|
// ^
|
||||||
// special placeholder that will be "eaten"
|
// special placeholder that will be "eaten"
|
||||||
// by appending to the tail
|
// by appending to the tail
|
||||||
</pre>
|
</pre> </div>
|
||||||
</div>
|
<div> <i>Sequences</i> are extremely efficient. Element access speed
|
||||||
<div>
|
approaches random access--even with <i>seqs</i> of up to <i>256</i>
|
||||||
<i>Sequences</i> are extremely efficient. Element access speed approaches
|
elements. This is because element access (among other things) is
|
||||||
random access--even with <i>seqs</i> of up to <i>256</i> elements. This
|
implemented iteratively rather than recursively. Therefore, elements
|
||||||
is because element access (among other things) is implemented iteratively
|
can be accessed at extremely high indices even on preprocessors with low
|
||||||
rather than recursively. Therefore, elements can be accessed at extremely
|
maximum expansion depths. </div>
|
||||||
high indices even on preprocessors with low maximum expansion depths.
|
<div> Elements of a <i>seq</i> can be extracted with <b>BOOST_PP_SEQ_ELEM</b>.
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<h4> Primitives </h4>
|
||||||
Elements of a <i>seq</i> can be extracted with <b>BOOST_PP_SEQ_ELEM</b>.
|
<ul>
|
||||||
</div>
|
<li> <a href="../ref/seq_elem.html">BOOST_PP_SEQ_ELEM</a></li>
|
||||||
<h4>
|
</ul>
|
||||||
Primitives
|
<hr size="1">
|
||||||
</h4>
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<ul>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
<li>
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
<a href="../ref/seq_elem.html">BOOST_PP_SEQ_ELEM</a></li>
|
<div style="margin-left: 0px;">
|
||||||
</ul>
|
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||||
<hr size="1">
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
<div style="margin-left: 0px;">
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
</div>
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
</body>
|
||||||
</div>
|
|
||||||
<div style="margin-left: 0px;">
|
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
|
||||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
|
||||||
copy at <a href=
|
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>tuples.html</title>
|
<title>tuples.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
@ -9,13 +10,19 @@
|
|||||||
parenthesis. For example, </div>
|
parenthesis. For example, </div>
|
||||||
<div class="code"> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
<div class="code"> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||||
<div> ...is a <i>tuple</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
<div> ...is a <i>tuple</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
||||||
<i>c</i>. </div>
|
<i>c</i>.<br>
|
||||||
|
<br>
|
||||||
|
A <i>tuple </i>cannot be empty. The notation '()' as a <i>tuple </i>is
|
||||||
|
a single element <i>tuple </i>of size 1, where the element is empty. </div>
|
||||||
<div> <i>Tuples</i> are fast and easy to use. With variadic macro
|
<div> <i>Tuples</i> are fast and easy to use. With variadic macro
|
||||||
support it is not necessary to know the size of a <i>tuple; </i>without
|
support it is not necessary to know the size of a <i>tuple; </i>without
|
||||||
variadic macro support all access to <i>tuples</i> requires
|
variadic macro support all access to <i>tuples</i> requires
|
||||||
knowledge of its size. Use a <i>tuple </i>instead of an <i>array</i> if
|
knowledge of its size. Use a <i>tuple </i>instead of an <i>array</i> if
|
||||||
your compiler supports variadic macros, since a <i>tuple </i>has all of
|
your compiler supports variadic macros, since a <i>tuple </i>has all of
|
||||||
the functionality as an <i>array </i>and is easier syntactically to use.</div>
|
the functionality as an <i>array </i>and is easier syntactically to use.
|
||||||
|
The only functionality an <i>array </i>has which a <i>tuple </i>does
|
||||||
|
not have is that an <i>array </i>can be empty whereas a <i>tuple </i>cannot
|
||||||
|
be empty.</div>
|
||||||
<div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>.
|
<div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>.
|
||||||
</div>
|
</div>
|
||||||
<h4>Primitives</h4>
|
<h4>Primitives</h4>
|
||||||
|
@ -1,34 +1,39 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_LIMIT_REPEAT</title>
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<title>BOOST_PP_LIMIT_REPEAT</title>
|
||||||
</head>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<body>
|
</head>
|
||||||
<div style="margin-left: 0px;">
|
<body>
|
||||||
The <b>BOOST_PP_LIMIT_REPEAT</b> macro defines the maximum number of repetitions supported by each <b>BOOST_PP_REPEAT</b> dimension.
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIMIT_REPEAT</b> macro
|
||||||
</div>
|
defines the maximum number of repetitions supported by each <b>BOOST_PP_REPEAT</b>
|
||||||
<h4>Usage</h4>
|
dimension. </div>
|
||||||
<div class="code">
|
<h4>Usage</h4>
|
||||||
<b>BOOST_PP_LIMIT_REPEAT</b>
|
<div class="code"> <b>BOOST_PP_LIMIT_REPEAT</b> </div>
|
||||||
</div>
|
<h4>Remarks</h4>
|
||||||
<h4>Remarks</h4>
|
<div> This macro current expands to <i>256</i>.<br>
|
||||||
<div>
|
<br>
|
||||||
This macro current expands to <i>256</i>.
|
NOTE: for the current latest versions of Microsoft's VC++ compiler there
|
||||||
</div>
|
is a nested macro limit of 256. This means in actuality that the number of
|
||||||
<h4>Requirements</h4>
|
repetitions using VC++ is actually less than 256 depending on the
|
||||||
<div>
|
repetition macro being used. For the BOOST_PP_REPEAT macro this limit
|
||||||
<b>Header:</b> <a href="../headers/config/limits.html"><boost/preprocessor/config/limits.hpp></a>
|
appears to be 252 while for the BOOST_PP_ENUM... series of macros this
|
||||||
</div>
|
limit appears to be around 230, before the VC++ compiler gives a "C1009:
|
||||||
<hr size="1">
|
compiler limit : macros nested too deeply" error. This is a compiler
|
||||||
<div style="margin-left: 0px;">
|
limitation of VC++ which may vary depending on the specific repetition
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
macro being used, and therefore is not a problem the preprocessor library
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
can solve.</div>
|
||||||
</div>
|
<h4>Requirements</h4>
|
||||||
<div style="margin-left: 0px;">
|
<div> <b>Header:</b> <a href="../headers/config/limits.html"><boost/preprocessor/config/limits.hpp></a>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
</div>
|
||||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
<hr size="1">
|
||||||
copy at <a href=
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
</div>
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
</body>
|
<div style="margin-left: 0px;">
|
||||||
|
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||||
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,67 +1,55 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_SEQ_REST_N</title>
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<title>BOOST_PP_SEQ_REST_N</title>
|
||||||
</head>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<body>
|
</head>
|
||||||
<div style="margin-left: 0px;">
|
<body>
|
||||||
The <b>BOOST_PP_SEQ_REST_N</b> macro expands to a <i>seq</i> of all but the
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_SEQ_REST_N</b> macro
|
||||||
first <i>n</i> elements of a <i>seq</i>.
|
expands to a <i>seq</i> of all but the first <i>n</i> elements of a <i>seq</i>.
|
||||||
</div>
|
</div>
|
||||||
<h4>
|
<h4> Usage </h4>
|
||||||
Usage
|
<div class="code"> <b>BOOST_PP_SEQ_REST_N</b>(<i>n</i>, <i>seq</i>) </div>
|
||||||
</h4>
|
<h4> Arguments </h4>
|
||||||
<div class="code">
|
<dl>
|
||||||
<b>BOOST_PP_SEQ_REST_N</b>(<i>n</i>, <i>seq</i>)
|
<dt>n</dt>
|
||||||
</div>
|
<dd> The number of elements to remove. </dd>
|
||||||
<h4>
|
<dt>seq</dt>
|
||||||
Arguments
|
<dd> The <i>seq</i> from which the elements are to be removed. </dd>
|
||||||
</h4>
|
</dl>
|
||||||
<dl>
|
<h4> Remarks </h4>
|
||||||
<dt>n</dt>
|
<div> This macro extracts <i>n</i> elements from the beginning of <i>seq</i>
|
||||||
<dd>
|
and returns the remainder of <i>seq</i> as a new <i>seq.<br>
|
||||||
The number of elements to remove.
|
<br>
|
||||||
</dd>
|
</i>It is undefined behavior if <i>n </i>is greater or equal to the size
|
||||||
<dt>seq</dt>
|
of the <i>seq</i>. </div>
|
||||||
<dd>
|
<h4> See Also </h4>
|
||||||
The <i>seq</i> from which the elements are to be removed.
|
<ul>
|
||||||
</dd>
|
<li> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a></li>
|
||||||
</dl>
|
</ul>
|
||||||
<h4>
|
<h4> Requirements </h4>
|
||||||
Remarks
|
<div> <b>Header:</b> <a href="../headers/seq/rest_n.html"><boost/preprocessor/seq/rest_n.hpp></a>
|
||||||
</h4>
|
</div>
|
||||||
<div>
|
<h4> Sample Code </h4>
|
||||||
This macro extracts <i>n</i> elements from the beginning of <i>seq</i> and
|
<div>
|
||||||
returns the remainder of <i>seq</i> as a new <i>seq</i>
|
<pre>#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>><br>#include <<a
|
||||||
</div>
|
href="../headers/seq/elem.html">boost/preprocessor/seq/elem.hpp</a>><br>#include <<a
|
||||||
<h4>
|
href="../headers/seq/first_n.html">boost/preprocessor/seq/first_n.hpp</a>><br>#include <<a
|
||||||
See Also
|
href="../headers/seq/rest_n.html">boost/preprocessor/seq/rest_n.hpp</a>><br>#include <<a
|
||||||
</h4>
|
href="../headers/seq/size.html">boost/preprocessor/seq/size.hpp</a>><br><br>#define NUMBERS \<br> (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \<br> (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \<br> (20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \<br> (30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \<br> (40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \<br> (50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \<br> (60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \<br> (70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \<br> (80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \<br> (90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \<br> (100)(101)(102)(103)(104)(105)(106)(107)(108)(109) \<br> (110)(111)(112)(113)(114)(115)(116)(117)(118)(119) \<br> (120)(121)(122)(123)(124)(125)(126)(127)(128)(129) \<br> (130)(131)(132)(133)(134)(135)(136)(137)(138)(139) \<br> (140)(141)(142)(143)(144)(145)(146)(147)(148)(149) \<br> (150)(151)(152)(153)(154)(155)(156)(157)(158)(159) \<br> (160)(161)(162)(163)(164)(165)(166)(167)(168)(169) \<br> (170)(171)(172)(173)(174)(175)(176)(177)(178)(179) \<br> (180)(181)(182)(183)(184)(185)(186)(187)(188)(189) \<br> (190)(191)(192)(193)(194)(195)(196)(197)(198)(199) \<br> (200)(201)(202)(203)(204)(205)(206)(207)(208)(209) \<br> (210)(211)(212)(213)(214)(215)(216)(217)(218)(219) \<br> (220)(221)(222)(223)(224)(225)(226)(227)(228)(229) \<br> (230)(231)(232)(233)(234)(235)(236)(237)(238)(239) \<br> (240)(241)(242)(243)(244)(245)(246)(247)(248)(249) \<br> (250)(251)(252)(253)(254)(255)(256) \<br> /**/<br><br>#define SUPER_ADD(x, y) <a
|
||||||
<ul>
|
href="seq_elem.html">BOOST_PP_SEQ_ELEM</a>(y, <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>(x, NUMBERS))<br><br>SUPER_ADD(100, 100) // expands to 200<br><br>#define SUPER_SUB(x, y) \<br> <a
|
||||||
<li>
|
href="seq_size.html">BOOST_PP_SEQ_SIZE</a>( \<br> <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>( \<br> <a
|
||||||
<a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a></li>
|
href="inc.html">BOOST_PP_INC</a>(y), \<br> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a>( \<br> <a
|
||||||
</ul>
|
href="inc.html">BOOST_PP_INC</a>(x), NUMBERS \<br> ) \<br> ) \<br> ) \<br> /**/<br><br>SUPER_SUB(67, 25) // expands to 42</pre>
|
||||||
<h4>
|
</div>
|
||||||
Requirements
|
<hr size="1">
|
||||||
</h4>
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<div>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
<b>Header:</b> <a href="../headers/seq/rest_n.html"><boost/preprocessor/seq/rest_n.hpp></a>
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
</div>
|
<div style="margin-left: 0px;">
|
||||||
<h4>
|
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||||
Sample Code
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
</h4>
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
<div>
|
</div>
|
||||||
<pre>#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>><br>#include <<a href="../headers/seq/elem.html">boost/preprocessor/seq/elem.hpp</a>><br>#include <<a href="../headers/seq/first_n.html">boost/preprocessor/seq/first_n.hpp</a>><br>#include <<a href="../headers/seq/rest_n.html">boost/preprocessor/seq/rest_n.hpp</a>><br>#include <<a href="../headers/seq/size.html">boost/preprocessor/seq/size.hpp</a>><br><br>#define NUMBERS \<br> (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \<br> (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \<br> (20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \<br> (30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \<br> (40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \<br> (50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \<br> (60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \<br> (70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \<br> (80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \<br> (90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \<br> (100)(101)(102)(103)(104)(105)(106)(107)(108)(109) \<br> (110)(111)(112)(113)(114)(115)(116)(117)(118)(119) \<br> (120)(121)(122)(123)(124)(125)(126)(127)(128)(129) \<br> (130)(131)(132)(133)(134)(135)(136)(137)(138)(139) \<br> (140)(141)(142)(143)(144)(145)(146)(147)(148)(149) \<br> (150)(151)(152)(153)(154)(155)(156)(157)(158)(159) \<br> (160)(161)(162)(163)(164)(165)(166)(167)(168)(169) \<br> (170)(171)(172)(173)(174)(175)(176)(177)(178)(179) \<br> (180)(181)(182)(183)(184)(185)(186)(187)(188)(189) \<br> (190)(191)(192)(193)(194)(195)(196)(197)(198)(199) \<br> (200)(201)(202)(203)(204)(205)(206)(207)(208)(209) \<br> (210)(211)(212)(213)(214)(215)(216)(217)(218)(219) \<br> (220)(221)(222)(223)(224)(225)(226)(227)(228)(229) \<br> (230)(231)(232)(233)(234)(235)(236)(237)(238)(239) \<br> (240)(241)(242)(243)(244)(245)(246)(247)(248)(249) \<br> (250)(251)(252)(253)(254)(255)(256) \<br> /**/<br><br>#define SUPER_ADD(x, y) <a href="seq_elem.html">BOOST_PP_SEQ_ELEM</a>(y, <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>(x, NUMBERS))<br><br>SUPER_ADD(100, 100) // expands to 200<br><br>#define SUPER_SUB(x, y) \<br> <a href="seq_size.html">BOOST_PP_SEQ_SIZE</a>( \<br> <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>( \<br> <a href="inc.html">BOOST_PP_INC</a>(y), \<br> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a>( \<br> <a href="inc.html">BOOST_PP_INC</a>(x), NUMBERS \<br> ) \<br> ) \<br> ) \<br> /**/<br><br>SUPER_SUB(67, 25) // expands to 42<br></pre>
|
</body>
|
||||||
</div>
|
|
||||||
<hr size="1">
|
|
||||||
<div style="margin-left: 0px;">
|
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
|
||||||
<br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
|
||||||
</div>
|
|
||||||
<div style="margin-left: 0px;">
|
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
|
||||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
|
||||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>title.html</title>
|
<title>title.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
</head>
|
</head>
|
||||||
@ -11,15 +12,14 @@
|
|||||||
may be used as a standalone library. </div>
|
may be used as a standalone library. </div>
|
||||||
<div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and
|
<div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and
|
||||||
Techniques from Boost and Beyond</i> by Dave Abrahams and Aleksey
|
Techniques from Boost and Beyond</i> by Dave Abrahams and Aleksey
|
||||||
Gurtovoy has been made available <a href="http://www.boostpro.com/mplbook/preprocessor.html"
|
Gurtovoy has been made <a href="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming.html"
|
||||||
target="_top"><font color="blue"><b><u><i>online</i></u></b></font></a>.
|
target="_top"><font color="blue"><b><u><i>available</i></u></b></font></a>.
|
||||||
This excerpt contains a basic introduction to the Preprocessor library and
|
This excerpt contains a basic introduction to the Preprocessor library and
|
||||||
preprocessor metaprogramming which may help users new to the library and
|
preprocessor metaprogramming which may help users new to the library and
|
||||||
users interested in seeing some of the facilities offered by the library.
|
users interested in seeing some of the facilities offered by the library.
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
|
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
http://www.boost.org/LICENSE_1_0.txt)-->
|
http://www.boost.org/LICENSE_1_0.txt)-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -284,5 +284,6 @@
|
|||||||
# define BOOST_PP_DEC_254 253
|
# define BOOST_PP_DEC_254 253
|
||||||
# define BOOST_PP_DEC_255 254
|
# define BOOST_PP_DEC_255 254
|
||||||
# define BOOST_PP_DEC_256 255
|
# define BOOST_PP_DEC_256 255
|
||||||
|
# define BOOST_PP_DEC_257 256
|
||||||
#
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -70,16 +70,18 @@
|
|||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADICS */
|
# /* BOOST_PP_VARIADICS */
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_VARIADICS_MSVC 0
|
||||||
# if !defined BOOST_PP_VARIADICS
|
# if !defined BOOST_PP_VARIADICS
|
||||||
# /* variadic support explicitly disabled for all untested compilers */
|
# /* variadic support explicitly disabled for all untested compilers */
|
||||||
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
|
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5130 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
|
||||||
# define BOOST_PP_VARIADICS 0
|
# define BOOST_PP_VARIADICS 0
|
||||||
# /* VC++ (C/C++) */
|
# /* VC++ (C/C++) */
|
||||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__
|
# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__
|
||||||
# define BOOST_PP_VARIADICS 1
|
# define BOOST_PP_VARIADICS 1
|
||||||
|
# undef BOOST_PP_VARIADICS_MSVC
|
||||||
# define BOOST_PP_VARIADICS_MSVC 1
|
# define BOOST_PP_VARIADICS_MSVC 1
|
||||||
# /* Wave (C/C++), GCC (C++) */
|
# /* Wave (C/C++), GCC (C++) */
|
||||||
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||||
# define BOOST_PP_VARIADICS 1
|
# define BOOST_PP_VARIADICS 1
|
||||||
# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
|
# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
|
||||||
# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
|
# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
|
||||||
@ -91,6 +93,7 @@
|
|||||||
# undef BOOST_PP_VARIADICS
|
# undef BOOST_PP_VARIADICS
|
||||||
# define BOOST_PP_VARIADICS 1
|
# define BOOST_PP_VARIADICS 1
|
||||||
# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI))
|
# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI))
|
||||||
|
# undef BOOST_PP_VARIADICS_MSVC
|
||||||
# define BOOST_PP_VARIADICS_MSVC 1
|
# define BOOST_PP_VARIADICS_MSVC 1
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
|
@ -32,5 +32,6 @@
|
|||||||
# include <boost/preprocessor/stringize.hpp>
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
# include <boost/preprocessor/tuple.hpp>
|
# include <boost/preprocessor/tuple.hpp>
|
||||||
# include <boost/preprocessor/variadic.hpp>
|
# include <boost/preprocessor/variadic.hpp>
|
||||||
|
# include <boost/preprocessor/wstringize.hpp>
|
||||||
#
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/debug/error.hpp>
|
# include <boost/preprocessor/debug/error.hpp>
|
||||||
|
# include <boost/preprocessor/facilities/empty.hpp>
|
||||||
|
# include <boost/preprocessor/logical/bool.hpp>
|
||||||
# include <boost/preprocessor/detail/auto_rec.hpp>
|
# include <boost/preprocessor/detail/auto_rec.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_FOR */
|
# /* BOOST_PP_FOR */
|
||||||
@ -42,7 +44,23 @@
|
|||||||
# include <boost/preprocessor/repetition/detail/for.hpp>
|
# include <boost/preprocessor/repetition/detail/for.hpp>
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002)
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
|
||||||
|
# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s))
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s))
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002)
|
||||||
|
# define BOOST_PP_FOR_257(s, p, o, m) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_FOR_257_PR(s,p), \
|
||||||
|
BOOST_PP_FOR_257_ERROR, \
|
||||||
|
BOOST_PP_EMPTY \
|
||||||
|
) \
|
||||||
|
() \
|
||||||
|
/**/
|
||||||
|
// # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002)
|
||||||
#
|
#
|
||||||
# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1
|
# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1
|
||||||
#
|
#
|
||||||
|
49
include/boost/preprocessor/seq/detail/is_empty.hpp
Normal file
49
include/boost/preprocessor/seq/detail/is_empty.hpp
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# /* **************************************************************************
|
||||||
|
# * *
|
||||||
|
# * (C) Copyright Edward Diener 2015.
|
||||||
|
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||||
|
# * accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
# * *
|
||||||
|
# ************************************************************************** */
|
||||||
|
#
|
||||||
|
# /* See http://www.boost.org for most recent version. */
|
||||||
|
#
|
||||||
|
# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
|
||||||
|
# define BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
|
||||||
|
#
|
||||||
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
|
# include <boost/preprocessor/logical/bool.hpp>
|
||||||
|
# include <boost/preprocessor/logical/compl.hpp>
|
||||||
|
# include <boost/preprocessor/seq/size.hpp>
|
||||||
|
#
|
||||||
|
/* An empty seq is one that is just BOOST_PP_SEQ_NIL */
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_DETAIL_IS_EMPTY(seq) \
|
||||||
|
BOOST_PP_COMPL \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \
|
||||||
|
BOOST_PP_COMPL \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
|
||||||
|
BOOST_PP_BOOL(size) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \
|
||||||
|
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq (nil))) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# endif
|
@ -14,47 +14,94 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
# include <boost/preprocessor/repetition/for.hpp>
|
# include <boost/preprocessor/repetition/for.hpp>
|
||||||
# include <boost/preprocessor/seq/seq.hpp>
|
# include <boost/preprocessor/seq/seq.hpp>
|
||||||
# include <boost/preprocessor/seq/size.hpp>
|
# include <boost/preprocessor/seq/size.hpp>
|
||||||
|
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||||
# include <boost/preprocessor/tuple/elem.hpp>
|
# include <boost/preprocessor/tuple/elem.hpp>
|
||||||
# include <boost/preprocessor/tuple/rem.hpp>
|
# include <boost/preprocessor/tuple/rem.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_FOR_EACH */
|
# /* BOOST_PP_SEQ_FOR_EACH */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq)
|
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq)
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x)))
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY(macro, data, seq)
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY \
|
||||||
|
) \
|
||||||
|
(macro, data, seq) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_TUPLE_ELEM(4, 3, x)
|
||||||
#
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x
|
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
|
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq))
|
# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq, sz) \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, BOOST_PP_DEC(sz)) \
|
||||||
|
/**/
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, sz) \
|
||||||
|
( \
|
||||||
|
macro, \
|
||||||
|
data, \
|
||||||
|
BOOST_PP_IF \
|
||||||
|
( \
|
||||||
|
sz, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_O_I_TAIL, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_O_I_NIL \
|
||||||
|
) \
|
||||||
|
(seq), \
|
||||||
|
sz \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_O_I_NIL(seq) BOOST_PP_NIL
|
||||||
#
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x)
|
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_4 x)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im)
|
# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
|
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq))
|
# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq, sz) macro(r, data, BOOST_PP_SEQ_HEAD(seq))
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_FOR_EACH_R */
|
# /* BOOST_PP_SEQ_FOR_EACH_R */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq)
|
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq)
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R(r, macro, data, seq)
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R \
|
||||||
|
) \
|
||||||
|
(r, macro, data, seq) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -15,47 +15,95 @@
|
|||||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
# include <boost/preprocessor/repetition/for.hpp>
|
# include <boost/preprocessor/repetition/for.hpp>
|
||||||
# include <boost/preprocessor/seq/seq.hpp>
|
# include <boost/preprocessor/seq/seq.hpp>
|
||||||
# include <boost/preprocessor/seq/size.hpp>
|
# include <boost/preprocessor/seq/size.hpp>
|
||||||
|
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||||
# include <boost/preprocessor/tuple/elem.hpp>
|
# include <boost/preprocessor/tuple/elem.hpp>
|
||||||
# include <boost/preprocessor/tuple/rem.hpp>
|
# include <boost/preprocessor/tuple/rem.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_FOR_EACH_I */
|
# /* BOOST_PP_SEQ_FOR_EACH_I */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)
|
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x)))
|
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq)
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \
|
||||||
|
) \
|
||||||
|
(macro, data, seq) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x)
|
||||||
#
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x
|
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i))
|
# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \
|
||||||
|
/**/
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \
|
||||||
|
( \
|
||||||
|
macro, \
|
||||||
|
data, \
|
||||||
|
BOOST_PP_IF \
|
||||||
|
( \
|
||||||
|
sz, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \
|
||||||
|
) \
|
||||||
|
(seq), \
|
||||||
|
BOOST_PP_INC(i), \
|
||||||
|
sz \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL
|
||||||
#
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x)
|
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)
|
# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
|
# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_FOR_EACH_I_R */
|
# /* BOOST_PP_SEQ_FOR_EACH_I_R */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)
|
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)
|
||||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq)
|
||||||
|
#
|
||||||
|
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \
|
||||||
|
BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \
|
||||||
|
) \
|
||||||
|
(r, macro, data, seq) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -12,18 +12,34 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
# ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
||||||
# define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
# define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
||||||
#
|
#
|
||||||
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/comparison/equal.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
# include <boost/preprocessor/seq/first_n.hpp>
|
# include <boost/preprocessor/seq/first_n.hpp>
|
||||||
# include <boost/preprocessor/seq/rest_n.hpp>
|
# include <boost/preprocessor/seq/rest_n.hpp>
|
||||||
|
# include <boost/preprocessor/seq/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_REPLACE */
|
# /* BOOST_PP_SEQ_REPLACE */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem)
|
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem)
|
||||||
# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY(seq, i)
|
||||||
|
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID(seq, i) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
||||||
|
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i) \
|
||||||
|
BOOST_PP_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_EQUAL(i,BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq))), \
|
||||||
|
BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY, \
|
||||||
|
BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID \
|
||||||
|
) \
|
||||||
|
(seq, i) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -14,17 +14,32 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/expr_iif.hpp>
|
||||||
# include <boost/preprocessor/facilities/identity.hpp>
|
# include <boost/preprocessor/facilities/identity.hpp>
|
||||||
|
# include <boost/preprocessor/logical/bitand.hpp>
|
||||||
|
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||||
# include <boost/preprocessor/seq/detail/split.hpp>
|
# include <boost/preprocessor/seq/detail/split.hpp>
|
||||||
# include <boost/preprocessor/tuple/elem.hpp>
|
# include <boost/preprocessor/tuple/elem.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_SEQ_REST_N */
|
# /* BOOST_PP_SEQ_REST_N */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))()
|
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
||||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))()
|
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
|
||||||
|
BOOST_PP_EXPR_IIF \
|
||||||
|
( \
|
||||||
|
BOOST_PP_BITAND \
|
||||||
|
( \
|
||||||
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
|
||||||
|
BOOST_PP_NOT_EQUAL(n,size) \
|
||||||
|
), \
|
||||||
|
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -543,5 +543,6 @@
|
|||||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254
|
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254
|
||||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255
|
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255
|
||||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256
|
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256
|
||||||
|
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257
|
||||||
#
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -36,7 +36,7 @@ BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END
|
|||||||
#define OVMAC_3(x,y,z) BOOST_PP_ADD(BOOST_PP_MUL(x,y),z)
|
#define OVMAC_3(x,y,z) BOOST_PP_ADD(BOOST_PP_MUL(x,y),z)
|
||||||
#define OVMAC_4(x,y,z,a) BOOST_PP_ADD(BOOST_PP_MUL(x,y),BOOST_PP_MUL(a,z))
|
#define OVMAC_4(x,y,z,a) BOOST_PP_ADD(BOOST_PP_MUL(x,y),BOOST_PP_MUL(a,z))
|
||||||
|
|
||||||
#if defined(BOOST_PP_VARIADICS_MSVC)
|
#if BOOST_PP_VARIADICS_MSVC
|
||||||
|
|
||||||
#define OVTEST(...) BOOST_PP_CAT(BOOST_PP_OVERLOAD(OVMAC_,__VA_ARGS__)(__VA_ARGS__),BOOST_PP_EMPTY())
|
#define OVTEST(...) BOOST_PP_CAT(BOOST_PP_OVERLOAD(OVMAC_,__VA_ARGS__)(__VA_ARGS__),BOOST_PP_EMPTY())
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#if BOOST_PP_VARIADICS
|
#if BOOST_PP_VARIADICS
|
||||||
|
|
||||||
#if defined(BOOST_PP_VARIADICS_MSVC) /* Testing the VC++ variadic version */
|
#if BOOST_PP_VARIADICS_MSVC /* Testing the VC++ variadic version */
|
||||||
|
|
||||||
/* INCORRECT */
|
/* INCORRECT */
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
|
|
||||||
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !defined(BOOST_PP_VARIADICS_MSVC)
|
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
|
||||||
|
|
||||||
#define FUNC_GEN8(x,y) (1,2,3)
|
#define FUNC_GEN8(x,y) (1,2,3)
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
|
|
||||||
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !defined(BOOST_PP_VARIADICS_MSVC)
|
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
|
||||||
|
|
||||||
#define FUNC_GEN9(x,y,z) anything
|
#define FUNC_GEN9(x,y,z) anything
|
||||||
|
|
||||||
|
81
test/seq.cxx
81
test/seq.cxx
@ -12,12 +12,14 @@
|
|||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||||
|
# include <boost/preprocessor/arithmetic/mod.hpp>
|
||||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/comparison/equal.hpp>
|
# include <boost/preprocessor/comparison/equal.hpp>
|
||||||
# include <boost/preprocessor/comparison/less.hpp>
|
# include <boost/preprocessor/comparison/less.hpp>
|
||||||
# include <boost/preprocessor/control/iif.hpp>
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||||
|
# include <boost/preprocessor/logical/not.hpp>
|
||||||
# include <boost/preprocessor/seq.hpp>
|
# include <boost/preprocessor/seq.hpp>
|
||||||
# include <boost/preprocessor/array/elem.hpp>
|
# include <boost/preprocessor/array/elem.hpp>
|
||||||
# include <boost/preprocessor/array/size.hpp>
|
# include <boost/preprocessor/array/size.hpp>
|
||||||
@ -31,6 +33,50 @@
|
|||||||
|
|
||||||
# define SEQ_NONE ()
|
# define SEQ_NONE ()
|
||||||
# define SEQ (4)(1)(5)(2)
|
# define SEQ (4)(1)(5)(2)
|
||||||
|
|
||||||
|
# define SEQ_100 \
|
||||||
|
(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)
|
||||||
|
|
||||||
|
# define SEQ_255 \
|
||||||
|
(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)
|
||||||
|
|
||||||
|
# define SEQ_256 SEQ_255(256)
|
||||||
|
|
||||||
# define SEQVAR (4,5,8,3,61)(1,0)(5,22,43)(2)(17,45,33)
|
# define SEQVAR (4,5,8,3,61)(1,0)(5,22,43)(2)(17,45,33)
|
||||||
|
|
||||||
# define REVERSAL(s, x, y) BOOST_PP_SUB(y, x)
|
# define REVERSAL(s, x, y) BOOST_PP_SUB(y, x)
|
||||||
@ -40,6 +86,8 @@
|
|||||||
|
|
||||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_HEAD(SEQ_NONE)) == 1 END
|
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_HEAD(SEQ_NONE)) == 1 END
|
||||||
BEGIN BOOST_PP_SEQ_HEAD(SEQ) == 4 END
|
BEGIN BOOST_PP_SEQ_HEAD(SEQ) == 4 END
|
||||||
|
BEGIN BOOST_PP_SEQ_HEAD(SEQ_255) == 1 END
|
||||||
|
BEGIN BOOST_PP_SEQ_HEAD(SEQ_256) == 1 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_FOLD_LEFT(CAT_S, 1, SEQ_NONE) == 11 END
|
BEGIN BOOST_PP_SEQ_FOLD_LEFT(CAT_S, 1, SEQ_NONE) == 11 END
|
||||||
BEGIN BOOST_PP_SEQ_FOLD_LEFT(SUB_S, 22, SEQ) == 10 END
|
BEGIN BOOST_PP_SEQ_FOLD_LEFT(SUB_S, 22, SEQ) == 10 END
|
||||||
@ -51,12 +99,21 @@ BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REVERSE(SEQ_NONE))) == 1 E
|
|||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REVERSE(SEQ)) == 2514 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REVERSE(SEQ)) == 2514 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REST_N(2, SEQ)) == 52 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REST_N(2, SEQ)) == 52 END
|
||||||
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REST_N(99, SEQ_100)) == 100 END
|
||||||
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REST_N(255, SEQ_256)) == 256 END
|
||||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FIRST_N(1, SEQ_NONE))) == 1 END
|
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FIRST_N(1, SEQ_NONE))) == 1 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FIRST_N(2, SEQ)) == 41 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FIRST_N(2, SEQ)) == 41 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(50,BOOST_PP_SEQ_FIRST_N(100, SEQ_100)) == 51 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(100,BOOST_PP_SEQ_FIRST_N(255, SEQ_255)) == 101 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(200,BOOST_PP_SEQ_FIRST_N(256, SEQ_256)) == 201 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_ELEM(0, SEQ_NONE)) == 1 END
|
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_ELEM(0, SEQ_NONE)) == 1 END
|
||||||
BEGIN BOOST_PP_SEQ_SIZE(SEQ_NONE) == 1 END
|
BEGIN BOOST_PP_SEQ_SIZE(SEQ_NONE) == 1 END
|
||||||
BEGIN BOOST_PP_SEQ_ELEM(2, SEQ) == 5 END
|
BEGIN BOOST_PP_SEQ_ELEM(2, SEQ) == 5 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(20, SEQ_255) == 21 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(254, SEQ_255) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(220, SEQ_256) == 221 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(255, SEQ_256) == 256 END
|
||||||
BEGIN BOOST_PP_SEQ_SIZE(SEQ) == 4 END
|
BEGIN BOOST_PP_SEQ_SIZE(SEQ) == 4 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM(CAT_S, 13, SEQ_NONE)) == 131 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM(CAT_S, 13, SEQ_NONE)) == 131 END
|
||||||
@ -83,29 +140,53 @@ BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE)))
|
|||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE)) == 1 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE)) == 1 END
|
||||||
|
|
||||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||||
|
# define FILTER_MOD_S(s, data, elem) BOOST_PP_NOT(BOOST_PP_MOD(elem,data))
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_SEQ_FILTER(FILTER_MOD_S, 20, SEQ_100)) == 100 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(2,BOOST_PP_SEQ_FILTER(FILTER_MOD_S, 30, SEQ_100)) == 90 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ_NONE, 0, 7)) == 7 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ_NONE, 0, 7)) == 7 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 0, 3)) == 34152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 0, 3)) == 34152 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 2, 3)) == 41352 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 2, 3)) == 41352 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 4, 3)) == 41523 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_INSERT(SEQ, 4, 3)) == 41523 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_INSERT(SEQ_255, 0, 100)) == 256 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(255,BOOST_PP_SEQ_INSERT(SEQ_255, 0, 100)) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(0,BOOST_PP_SEQ_INSERT(SEQ_255, 0, 113)) == 113 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_BACK(SEQ)) == 415 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_BACK(SEQ)) == 415 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_BACK(SEQ_256)) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(254,BOOST_PP_SEQ_POP_BACK(SEQ_256)) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(100,BOOST_PP_SEQ_POP_BACK(SEQ_256)) == 101 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_FRONT(SEQ)) == 152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_FRONT(SEQ)) == 152 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_FRONT(SEQ_256)) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(0,BOOST_PP_SEQ_POP_FRONT(SEQ_256)) == 2 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(254,BOOST_PP_SEQ_POP_FRONT(SEQ_256)) == 256 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ_NONE, 145)) == 145 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ_NONE, 145)) == 145 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ, 3)) == 34152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ, 3)) == 34152 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_PUSH_FRONT(SEQ_255, 57)) == 256 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(0,BOOST_PP_SEQ_PUSH_FRONT(SEQ_255, 222)) == 222 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(255,BOOST_PP_SEQ_PUSH_FRONT(SEQ_255, 111)) == 255 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ_NONE, 79)) == 79 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ_NONE, 79)) == 79 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ, 3)) == 41523 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ, 3)) == 41523 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_PUSH_BACK(SEQ_255, 199)) == 256 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(254,BOOST_PP_SEQ_PUSH_BACK(SEQ_255, 99)) == 255 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(255,BOOST_PP_SEQ_PUSH_BACK(SEQ_255, 99)) == 99 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 0)) == 152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 0)) == 152 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 2)) == 412 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 2)) == 412 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 3)) == 415 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REMOVE(SEQ, 3)) == 415 END
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_REMOVE(SEQ_255, 254)) == 254 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_REMOVE(SEQ_256, 255)) == 255 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ_NONE, 0, 22)) == 22 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ_NONE, 0, 22)) == 22 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 0, 3)) == 3152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 0, 3)) == 3152 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 1, 3)) == 4352 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 1, 3)) == 4352 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 3, 3)) == 4153 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_REPLACE(SEQ, 3, 3)) == 4153 END
|
||||||
|
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_REPLACE(SEQ_256, 255, 22)) == 256 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(233,BOOST_PP_SEQ_REPLACE(SEQ_256, 255, 22)) == 234 END
|
||||||
|
BEGIN BOOST_PP_SEQ_ELEM(255,BOOST_PP_SEQ_REPLACE(SEQ_256, 255, 22)) == 22 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 0, 4)) == 4152 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 0, 4)) == 4152 END
|
||||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 0, 2)) == 41 END
|
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 0, 2)) == 41 END
|
||||||
|
Reference in New Issue
Block a user