forked from boostorg/preprocessor
Merge develop to master
Conflicts: doc/headers.html doc/headers/tuple.html doc/ref.html doc/topics/variadic_macros.html
This commit is contained in:
@ -5,33 +5,29 @@
|
||||
</head>
|
||||
<body>
|
||||
<h4>Arrays</h4>
|
||||
<div>
|
||||
An <i>array</i> is a data structure consisting of a two-element <i>tuple</i>.
|
||||
<div> An <i>array</i> is a data structure consisting of a two-element <i>tuple</i>.
|
||||
The first element is the number of elements in the <i>array</i>.
|
||||
The second element is another <i>tuple</i> of the elements in the <i>array</i>.
|
||||
For example,
|
||||
</div>
|
||||
<div class="code">
|
||||
(<i>3</i>, (<i>a</i>, <i>b</i>, <i>c</i>))
|
||||
</div>
|
||||
<div>
|
||||
...is an <i>array</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||
</div>
|
||||
<div>
|
||||
The primary strength of <i>arrays</i> is that they store their own size.
|
||||
Because of this, access to elements does not require the 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 states to change
|
||||
size without the user explicitly keeping track of the size independently.
|
||||
</div>
|
||||
<div>
|
||||
For example, </div>
|
||||
<div class="code"> (<i>3</i>, (<i>a</i>, <i>b</i>, <i>c</i>)) </div>
|
||||
<div> ...is an <i>array</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
||||
<i>c</i>. </div>
|
||||
<div> The primary strength of <i>arrays</i> is that they store their own
|
||||
size. Because of this, access to elements does not require the
|
||||
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
|
||||
states to change size without the user explicitly keeping track of the
|
||||
size independently.</div>
|
||||
<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
|
||||
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
|
||||
variadic macros.<br>
|
||||
<br>
|
||||
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>, and
|
||||
an <i>array</i> can be converted to the more primitive <i>tuple</i> data structure
|
||||
with <b>BOOST_PP_ARRAY_DATA</b>.
|
||||
</div>
|
||||
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>,
|
||||
and an <i>array</i> can be converted to the more primitive <i>tuple</i>
|
||||
data structure with <b>BOOST_PP_ARRAY_DATA</b>. </div>
|
||||
<h4>Primitives</h4>
|
||||
<ul>
|
||||
<li><a href="../ref/array_data.html">BOOST_PP_ARRAY_DATA</a></li>
|
||||
@ -39,15 +35,13 @@
|
||||
<li><a href="../ref/array_size.html">BOOST_PP_ARRAY_SIZE</a></li>
|
||||
</ul>
|
||||
<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;"> <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>
|
||||
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>
|
||||
|
@ -5,38 +5,31 @@
|
||||
</head>
|
||||
<body>
|
||||
<h4>Tuples</h4>
|
||||
<div>
|
||||
A <i>tuple</i> is a simple comma-separated list of elements inside parenthesis.
|
||||
For example,
|
||||
</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 <i>c</i>.
|
||||
</div>
|
||||
<div>
|
||||
<i>Tuples</i> are fast and easy to use.
|
||||
However, all access to <i>tuples</i> requires knowledge of its size.
|
||||
</div>
|
||||
<div>
|
||||
Elements of a <i>tuple</i> can be extracted with
|
||||
<b>BOOST_PP_TUPLE_ELEM</b>.
|
||||
<div> A <i>tuple</i> is a simple comma-separated list of elements inside
|
||||
parenthesis. For example, </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
|
||||
<i>c</i>. </div>
|
||||
<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
|
||||
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
|
||||
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>
|
||||
<div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>.
|
||||
</div>
|
||||
<h4>Primitives</h4>
|
||||
<ul>
|
||||
<li><a href="../ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a></li>
|
||||
</ul>
|
||||
<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;"> <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>
|
||||
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>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>headers.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<base target="desc">
|
||||
@ -83,7 +84,8 @@
|
||||
<li class="ps"><a href="headers/facilities/expand.html">expand.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/identity.html">identity.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/intercept.html">intercept.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/overload.html">overload.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/facilities/overload.html">overload.hpp</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/for.html">for.hpp*</a></li>
|
||||
<li><a href="headers/identity.html">identity.hpp*</a></li>
|
||||
<li><a href="headers/if.html">if.hpp*</a></li>
|
||||
@ -194,39 +196,52 @@
|
||||
<li class="ps"><a href="headers/seq/to_list.html">to_list.hpp</a></li>
|
||||
<li class="ps"><a href="headers/seq/to_tuple.html">to_tuple.hpp</a></li>
|
||||
<li class="ps"><a href="headers/seq/transform.html">transform.hpp</a></li>
|
||||
<li class="ps"><a href="headers/seq/variadic_seq_to_seq.html">variadic_seq_to_seq.hpp</a></li>
|
||||
<li><a href="headers/slot.html">slot.hpp</a></li>
|
||||
<li>slot/</li>
|
||||
<li class="ps"><a href="headers/slot/counter.html">counter.hpp</a></li>
|
||||
<li class="ps"><a href="headers/slot/slot.html">slot.hpp</a></li>
|
||||
<li><a href="headers/tuple.html">tuple.hpp</a></li>
|
||||
<li>tuple/</li>
|
||||
<li class="ps"><a href="headers/tuple/eat.html">eat.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/elem.html">elem.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/enum.html">enum.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/rem.html">rem.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/reverse.html">reverse.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/size.html">size.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/to_array.html">to_array.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/to_list.html">to_list.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/to_seq.html">to_seq.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/tuple/eat.html">eat.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/elem.html">elem.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/enum.html">enum.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/insert.html">insert.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/pop_back.html">pop_back.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/pop_front.html">pop_front.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/push_back.html">push_back.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/push_front.html">push_front.hpp</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/rem.html">rem.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/remove.html">remove.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/replace.html">replace.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/reverse.html">reverse.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/size.html">size.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/to_array.html">to_array.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/to_list.html">to_list.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/tuple/to_seq.html">to_seq.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/stringize.html">stringize.hpp</a></li>
|
||||
<li><a href="headers/variadic.html">variadic.hpp</a></li>
|
||||
<li>variadic/</li>
|
||||
<li class="ps"><a href="headers/variadic/elem.html">elem.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/size.html">size.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/to_array.html">to_array.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/to_list.html">to_list.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/to_seq.html">to_seq.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/to_tuple.html">to_tuple.hpp</a> (v)</li>
|
||||
<li class="ps"><a href="headers/variadic/elem.html">elem.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/size.html">size.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/to_array.html">to_array.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/to_list.html">to_list.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/to_seq.html">to_seq.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/to_tuple.html">to_tuple.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/while.html">while.hpp*</a></li>
|
||||
<li><a href="headers/wstringize.html">wstringize.hpp</a></li>
|
||||
</ul>
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002
|
||||
<EFBFBD> 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)
|
||||
-->
|
||||
<EFBFBD> Copyright Housemarque Oy 2002<EFBFBD> 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)-->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,37 +1,59 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>tuple.hpp</b> includes the headers in the <i>tuple</i> folder.
|
||||
</div>
|
||||
<div style="margin-left: 0px;"> The <b>tuple.hpp</b> includes the headers
|
||||
in the <i>tuple</i> folder. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
#include <b><boost/preprocessor/tuple.hpp></b>
|
||||
</div>
|
||||
<h4>Includes<br></h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple.hpp></b> </div>
|
||||
<h4>Includes</h4>
|
||||
<ul>
|
||||
<li><a href="tuple/eat.html"><boost/preprocessor/tuple/eat.hpp></a> (v)</li>
|
||||
<li><a href="tuple/elem.html"><boost/preprocessor/tuple/elem.hpp></a> (v)</li>
|
||||
<li><a href="tuple/enum.html"><boost/preprocessor/tuple/enum.hpp></a> (v)</li>
|
||||
<li><a href="tuple/rem.html"><boost/preprocessor/tuple/rem.hpp></a> (v)</li>
|
||||
<li><a href="tuple/reverse.html"><boost/preprocessor/tuple/reverse.hpp></a> (v)</li>
|
||||
<li><a href="tuple/size.html"><boost/preprocessor/tuple/size.hpp></a> (v)</li>
|
||||
<li><a href="tuple/to_array.html"><boost/preprocessor/tuple/to_array.hpp></a> (v)</li>
|
||||
<li><a href="tuple/to_list.html"><boost/preprocessor/tuple/to_list.hpp></a> (v)</li>
|
||||
<li><a href="tuple/to_seq.html"><boost/preprocessor/tuple/to_seq.hpp></a> (v)</li>
|
||||
<li><a href="tuple/eat.html"><boost/preprocessor/tuple/eat.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/elem.html"><boost/preprocessor/tuple/elem.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/enum.html"><boost/preprocessor/tuple/enum.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/insert.html"><boost/preprocessor/tuple/insert.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/pop_back.html"><boost/preprocessor/tuple/pop_back.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/pop_front.html"><boost/preprocessor/tuple/pop_front.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/push_back.html"><boost/preprocessor/tuple/push_back.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/push_front.html"><boost/preprocessor/tuple/push_front.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/rem.html"><boost/preprocessor/tuple/rem.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/remove.html"><boost/preprocessor/tuple/remove.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/replace.html"><boost/preprocessor/tuple/replace.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="tuple/reverse.html"><boost/preprocessor/tuple/reverse.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/size.html"><boost/preprocessor/tuple/size.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/to_array.html"><boost/preprocessor/tuple/to_array.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/to_list.html"><boost/preprocessor/tuple/to_list.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="tuple/to_seq.html"><boost/preprocessor/tuple/to_seq.hpp></a>
|
||||
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
</ul>
|
||||
<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 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<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2013</i><br>
|
||||
</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>
|
||||
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>
|
||||
|
27
doc/headers/tuple/insert.html
Normal file
27
doc/headers/tuple/insert.html
Normal file
@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/insert.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/insert.hpp</b> header defines
|
||||
macros to insert an element into an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/insert.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_insert.html">BOOST_PP_TUPLE_INSERT</a> <a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="../../ref/tuple_insert_d.html">BOOST_PP_TUPLE_INSERT_D</a> <a
|
||||
href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
28
doc/headers/tuple/pop_back.html
Normal file
28
doc/headers/tuple/pop_back.html
Normal file
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/pop_back.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/pop_back.hpp</b> header
|
||||
defines macros to pop an element from the end of an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/pop_back.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_pop_back.html">BOOST_PP_TUPLE_POP_BACK</a> <a
|
||||
href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="../../ref/tuple_pop_back_z.html">BOOST_PP_TUPLE_POP_BACK_Z</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
28
doc/headers/tuple/pop_front.html
Normal file
28
doc/headers/tuple/pop_front.html
Normal file
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/pop_front.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/pop_front.hpp</b> header
|
||||
defines macros to pop an element from the beginning of an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/pop_front.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_pop_front.html">BOOST_PP_TUPLE_POP_FRONT</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="../../ref/tuple_pop_front_z.html">BOOST_PP_TUPLE_POP_FRONT_Z</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
26
doc/headers/tuple/push_back.html
Normal file
26
doc/headers/tuple/push_back.html
Normal file
@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/push_back.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/push_back.hpp</b> header
|
||||
defines a macro to append an element to the end of an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/push_back.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_push_back.html">BOOST_PP_TUPLE_PUSH_BACK</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
26
doc/headers/tuple/push_front.html
Normal file
26
doc/headers/tuple/push_front.html
Normal file
@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/push_front.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/push_front.hpp</b> header
|
||||
defines a macro to append an element to the beginning of an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/push_front.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_push_front.html">BOOST_PP_TUPLE_PUSH_FRONT</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
27
doc/headers/tuple/remove.html
Normal file
27
doc/headers/tuple/remove.html
Normal file
@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/remove.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/remove.hpp</b> header defines
|
||||
macros to remove an element from an <i>array</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/remove.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_remove.html">BOOST_PP_TUPLE_REMOVE</a> <a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="../../ref/tuple_remove_d.html">BOOST_PP_TUPLE_REMOVE_D</a> <a
|
||||
href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
28
doc/headers/tuple/replace.html
Normal file
28
doc/headers/tuple/replace.html
Normal file
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuple/replace.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>tuple/replace.hpp</b> header
|
||||
defines macros to replace an element in an <i>array</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/tuple/replace.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/tuple_replace.html">BOOST_PP_TUPLE_REPLACE</a> <a
|
||||
href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="../../ref/tuple_replace_d.html">BOOST_PP_TUPLE_REPLACE_D</a>
|
||||
<a href="../../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
58
doc/ref.html
58
doc/ref.html
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>ref.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<base target="desc">
|
||||
@ -202,7 +203,7 @@
|
||||
<li><a href="ref/not_equal_d.html">NOT_EQUAL_D*</a></li>
|
||||
<!-- O -->
|
||||
<li><a href="ref/or.html">OR</a></li>
|
||||
<li><a href="ref/overload.html">OVERLOAD</a> (v)</li>
|
||||
<li><a href="ref/overload.html">OVERLOAD</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<!-- R -->
|
||||
<li><a href="ref/relative_finish.html">RELATIVE_FINISH</a></li>
|
||||
<li><a href="ref/relative_flags.html">RELATIVE_FLAGS</a></li>
|
||||
@ -265,27 +266,41 @@
|
||||
<li><a href="ref/sub.html">SUB</a></li>
|
||||
<li><a href="ref/sub_d.html">SUB_D</a></li>
|
||||
<!-- T -->
|
||||
<li><a href="ref/tuple_eat.html">TUPLE_EAT</a> (v)</li>
|
||||
<li><a href="ref/tuple_elem.html">TUPLE_ELEM</a> (v)</li>
|
||||
<li><a href="ref/tuple_enum.html">TUPLE_ENUM</a> (v)</li>
|
||||
<li><a href="ref/tuple_rem.html">TUPLE_REM</a> (v)</li>
|
||||
<li><a href="ref/tuple_rem_ctor.html">TUPLE_REM_CTOR</a> (v)</li>
|
||||
<li><a href="ref/tuple_reverse.html">TUPLE_REVERSE</a> (v)</li>
|
||||
<li><a href="ref/tuple_size.html">TUPLE_SIZE</a> (v)</li>
|
||||
<li><a href="ref/tuple_to_array.html">TUPLE_TO_ARRAY</a> (v)</li>
|
||||
<li><a href="ref/tuple_to_list.html">TUPLE_TO_LIST</a> (v)</li>
|
||||
<li><a href="ref/tuple_to_seq.html">TUPLE_TO_SEQ</a> (v)</li>
|
||||
<li><a href="ref/tuple_eat.html">TUPLE_EAT</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_elem.html">TUPLE_ELEM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_enum.html">TUPLE_ENUM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><span style="color: gray;"></span><a href="ref/tuple_insert.html">TUPLE_INSERT</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_insert_d.html">TUPLE_INSERT_D</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_pop_back.html">TUPLE_POP_BACK</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_pop_back_z.html">TUPLE_POP_BACK_Z</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_pop_front.html">TUPLE_POP_FRONT</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_pop_front_z.html">TUPLE_POP_FRONT_Z</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_push_back.html">TUPLE_PUSH_BACK</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_push_front.html">TUPLE_PUSH_FRONT</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_rem.html">TUPLE_REM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_rem_ctor.html">TUPLE_REM_CTOR</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_remove.html">TUPLE_REMOVE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_remove_d.html">TUPLE_REMOVE_D</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_replace.html">TUPLE_REPLACE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_replace_d.html">TUPLE_REPLACE_D</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_reverse.html">TUPLE_REVERSE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_size.html">TUPLE_SIZE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_to_array.html">TUPLE_TO_ARRAY</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_to_list.html">TUPLE_TO_LIST</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/tuple_to_seq.html">TUPLE_TO_SEQ</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<!-- U -->
|
||||
<li><a href="ref/update_counter.html">UPDATE_COUNTER</a></li>
|
||||
<!-- V -->
|
||||
<li><a href="ref/value.html">VALUE</a></li>
|
||||
<li><a href="ref/variadics.html">VARIADICS</a></li>
|
||||
<li><a href="ref/variadic_elem.html">VARIADIC_ELEM</a> (v)</li>
|
||||
<li><a href="ref/variadic_size.html">VARIADIC_SIZE</a> (v)</li>
|
||||
<li><a href="ref/variadic_to_array.html">VARIADIC_TO_ARRAY</a> (v)</li>
|
||||
<li><a href="ref/variadic_to_list.html">VARIADIC_TO_LIST</a> (v)</li>
|
||||
<li><a href="ref/variadic_to_seq.html">VARIADIC_TO_SEQ</a> (v)</li>
|
||||
<li><a href="ref/variadic_to_tuple.html">VARIADIC_TO_TUPLE</a> (v)</li>
|
||||
<li><a href="ref/variadic_elem.html">VARIADIC_ELEM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_seq_to_seq.html">VARIADIC_SEQ_TO_SEQ</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_size.html">VARIADIC_SIZE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_to_array.html">VARIADIC_TO_ARRAY</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_to_list.html">VARIADIC_TO_LIST</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_to_seq.html">VARIADIC_TO_SEQ</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_to_tuple.html">VARIADIC_TO_TUPLE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<!-- W -->
|
||||
<li><a href="ref/while.html">WHILE</a></li>
|
||||
<li><a href="ref/while_d.html">WHILE_<i>d</i></a></li>
|
||||
@ -294,11 +309,8 @@
|
||||
<li><a href="ref/xor.html">XOR</a></li>
|
||||
</ul>
|
||||
<!--
|
||||
© Copyright Housemarque Oy 2002
|
||||
© 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)
|
||||
-->
|
||||
© Copyright Housemarque Oy 2002© 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)-->
|
||||
</body>
|
||||
</html>
|
@ -1,59 +1,51 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_ARRAY_POP_FRONT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_ARRAY_POP_FRONT</b> macro pops an element from the end of an <i>array</i>.
|
||||
</div>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_POP_FRONT</b> macro
|
||||
pops an element from the beginning of an <i>array</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_ARRAY_POP_FRONT</b>(<i>array</i>)
|
||||
</div>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_POP_FRONT</b>(<i>array</i>) </div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd>
|
||||
The <i>array</i> to pop an element from.
|
||||
</dd>
|
||||
<dd> The <i>array</i> to pop an element from. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro returns <i>array</i> after removing the first element.
|
||||
If <i>array</i> has no elements, the result of applying this macro is undefined.
|
||||
</div>
|
||||
<div>
|
||||
This macro uses <b>BOOST_PP_REPEAT</b> internally.
|
||||
Therefore, to use the <i>z</i> parameter passed from other macros that use
|
||||
<b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ARRAY_POP_FRONT_Z</b>
|
||||
</div>
|
||||
<div> This macro returns <i>array</i> after removing the first
|
||||
element. If <i>array</i> has no elements, the result of applying
|
||||
this macro is undefined. </div>
|
||||
<div> This macro uses <b>BOOST_PP_REPEAT</b> internally. Therefore,
|
||||
to use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>,
|
||||
see <b>BOOST_PP_ARRAY_POP_FRONT_Z</b> </div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="array_pop_front_z.html">BOOST_PP_ARRAY_POP_FRONT_Z</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/array/pop_front.html"><boost/preprocessor/array/pop_front.hpp></a>
|
||||
<div> <b>Header:</b> <a href="../headers/array/pop_front.html"><boost/preprocessor/array/pop_front.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/array/pop_front.html">boost/preprocessor/array/pop_front.hpp</a>>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/pop_front.html">boost/preprocessor/array/pop_front.hpp</a>>
|
||||
|
||||
#define ARRAY (3, (a, b, c))
|
||||
|
||||
<a href="array_pop_front.html">BOOST_PP_ARRAY_POP_FRONT</a>(ARRAY) // expands to (2, (b, c))
|
||||
</pre></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 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<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2013</i><br>
|
||||
</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>
|
||||
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>
|
||||
|
54
doc/ref/tuple_insert.html
Normal file
54
doc/ref/tuple_insert.html
Normal file
@ -0,0 +1,54 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_INSERT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT</b> macro
|
||||
inserts an element into an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_INSERT</b>(<i>tuple</i>, <i>i</i>, <i>elem</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> into which an element is to be inserted. </dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> where an element is to be
|
||||
inserted. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The element to insert. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro inserts <i>elem</i> before the element at index <i>i</i>.
|
||||
</div>
|
||||
<div> If the operation attempts to create an <i>tuple</i> that is larger
|
||||
than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
|
||||
<div> This macro uses <b>BOOST_PP_WHILE</b> interally. Therefore, to
|
||||
use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
|
||||
see <b>BOOST_PP_TUPLE_INSERT_D</b>.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_insert_d.html">BOOST_PP_TUPLE_INSERT_D</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/insert.html"><boost/preprocessor/tuple/insert.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/insert.html">boost/preprocessor/tuple/insert.hpp</a>>
|
||||
|
||||
#define TUPLE (a, b, d)
|
||||
|
||||
<a href="tuple_insert.html">BOOST_PP_TUPLE_INSERT</a>(TUPLE, 2, c) // expands to (a, b, c, d)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
46
doc/ref/tuple_insert_d.html
Normal file
46
doc/ref/tuple_insert_d.html
Normal file
@ -0,0 +1,46 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_INSERT_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT_D</b> macro
|
||||
inserts an element into a <i>tuple</i>. It reenters <b>BOOST_PP_WHILE</b>
|
||||
with maximum efficiency.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_INSERT_D</b>(<i>d</i>, <i>tuple</i>,
|
||||
<i>i</i>, <i>elem</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd> The next available <b>BOOST_PP_WHILE</b> iteration. </dd>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> into which an element is to be inserted.</dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> where an element is to be
|
||||
inserted. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The element to insert. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro inserts <i>elem</i> before the element at index <i>i</i>.
|
||||
</div>
|
||||
<div> If the operation attempts to create an <i>tuple</i> that is larger
|
||||
than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_insert.html">BOOST_PP_TUPLE_INSERT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/insert.html"><boost/preprocessor/tuple/insert.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
48
doc/ref/tuple_pop_back.html
Normal file
48
doc/ref/tuple_pop_back.html
Normal file
@ -0,0 +1,48 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_POP_BACK</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_POP_BACK</b> macro
|
||||
pops an element from the end of an <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_POP_BACK</b>(<i>tuple</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd>The <i>tuple</i> to pop an element from.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div style="background-color: white;"> This macro returns <i>tuple</i>
|
||||
after removing the last element. If <i>tuple</i> has only a single
|
||||
element, it remains unchanged since a <i>tuple </i>must have at
|
||||
least one element.</div>
|
||||
<div> This macro uses <b>BOOST_PP_REPEAT</b> internally. Therefore,
|
||||
to use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>,
|
||||
see <b>BOOST_PP_TUPLE_POP_BACK_Z</b> </div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_pop_back_z.html">BOOST_PP_TUPLE_POP_BACK_Z</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/pop_back.html"><boost/preprocessor/tuple/pop_back.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/pop_back.html">boost/preprocessor/tuple/pop_back.hpp</a>>
|
||||
|
||||
#define TUPLE (a, b, c)
|
||||
|
||||
<a href="tuple_pop_back.html">BOOST_PP_TUPLE_POP_BACK</a>(TUPLE) // expands to (a, b)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
40
doc/ref/tuple_pop_back_z.html
Normal file
40
doc/ref/tuple_pop_back_z.html
Normal file
@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_POP_BACK_Z</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_POP_BACK_Z</b> macro
|
||||
pops an element from the end of an <i>tuple</i>. It reenters <b>BOOST_PP_REPEAT</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_POP_BACK_Z</b>(<i>z</i>, <i>tuple</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>z</dt>
|
||||
<dd> The next available <b>BOOST_PP_REPEAT</b> dimension. </dd>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> to pop an element from.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro returns <i>tuple</i> after removing the last
|
||||
element. If <i>tuple</i> has only a single element, it remains
|
||||
unchanged since a <i>tuple </i>must have at least one element.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_pop_back.html">BOOST_PP_TUPLE_POP_BACK</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/pop_back.html"><boost/preprocessor/tuple/pop_back.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
47
doc/ref/tuple_pop_front.html
Normal file
47
doc/ref/tuple_pop_front.html
Normal file
@ -0,0 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_POP_FRONT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_POP_FRONT</b> macro
|
||||
pops an element from the beginning of a <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_POP_FRONT</b>(<i>tuple</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> to pop an element from.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro returns <i>tuple</i> after removing the first
|
||||
element. If <i>tuple</i> has only a single element, it remains
|
||||
unchanged since a <i>tuple </i>must have at least one element.</div>
|
||||
<div> This macro uses <b>BOOST_PP_REPEAT</b> internally. Therefore,
|
||||
to use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>,
|
||||
see <b>BOOST_PP_TUPLE_POP_FRONT_Z</b> </div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_pop_front_z.html">BOOST_PP_TUPLE_POP_FRONT_Z</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/pop_front.html"><boost/preprocessor/tuple/pop_front.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/pop_front.html">boost/preprocessor/tuple/pop_front.hpp</a>>
|
||||
|
||||
#define TUPLE (a, b, c)
|
||||
|
||||
<a href="tuple_pop_front.html">BOOST_PP_TUPLE_POP_FRONT</a>(TUPLE) // expands to (b, c)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
40
doc/ref/tuple_pop_front_z.html
Normal file
40
doc/ref/tuple_pop_front_z.html
Normal file
@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_POP_FRONT_Z</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_POP_FRONT_Z</b>
|
||||
macro pops an element from the beginning of a <i>tuple</i>. It
|
||||
reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_POP_FRONT_Z</b>(<i>z</i>, <i>tuple</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>z</dt>
|
||||
<dd> The next available <b>BOOST_PP_REPEAT</b> dimension.</dd>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> to pop an element from.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro returns <i>tuple</i> after removing the first
|
||||
element. If <i>tuple</i> has only a single element, it remains
|
||||
unchanged since a <i>tuple </i>must have at least one element.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_pop_front.html">BOOST_PP_TUPLE_POP_FRONT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/pop_front.html"><boost/preprocessor/tuple/pop_front.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
39
doc/ref/tuple_push_back.html
Normal file
39
doc/ref/tuple_push_back.html
Normal file
@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_PUSH_BACK</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_PUSH_BACK</b> macro
|
||||
appends an element to the end of a <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_PUSH_BACK</b>(<i>tuple</i>, <i>elem</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> to append an element to.</dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The element to append. </dd>
|
||||
</dl>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/push_back.html"><boost/preprocessor/tuple/push_back.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/push_back.html">boost/preprocessor/tuple/push_back.hpp</a>>
|
||||
|
||||
#define TUPLE (a, b, c)
|
||||
|
||||
<a href="tuple_push_back.html">BOOST_PP_TUPLE_PUSH_BACK</a>(TUPLE, d) // expands to (a, b, c, d)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanyig 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>
|
39
doc/ref/tuple_push_front.html
Normal file
39
doc/ref/tuple_push_front.html
Normal file
@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_PUSH_FRONT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_PUSH_FRONT</b> macro
|
||||
appends an element to the beginning of a <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_PUSH_FRONT</b>(<i>tuple</i>, <i>elem</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> to append an element to.</dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The element to append. </dd>
|
||||
</dl>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/push_front.html"><boost/preprocessor/tuple/push_front.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/push_front.html">boost/preprocessor/tuple/push_front.hpp</a>>
|
||||
|
||||
#define TUPLE (b, c, d)
|
||||
|
||||
<a href="tuple_push_front.html">BOOST_PP_TUPLE_PUSH_FRONT</a>(TUPLE, a) // expands to (a, b, c, d)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
@ -33,6 +33,7 @@ completely so that the macro can be invoked as BOOST_PP_TUPLE_REM(); you may get
|
||||
functionality will still work. If you specify a size in the variadic
|
||||
version, it will be ignored, but the warning from some compilers will
|
||||
not occur.<br>
|
||||
<br>Note: For Visual C++ 8.0 ( Visual Studio 2005 ) you must specify the correct <i>size</i> argument as in the non-variadic version.<br>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
|
50
doc/ref/tuple_remove.html
Normal file
50
doc/ref/tuple_remove.html
Normal file
@ -0,0 +1,50 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_REMOVE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REMOVE</b> macro
|
||||
removes an element from a <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_REMOVE</b>(<i>tuple</i>, <i>i</i>) <a
|
||||
href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> from which an element is to be removed.</dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> of the element to be
|
||||
removed. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>)
|
||||
- <i>1</i>. If <i>tuple</i> has only a single element, it remains
|
||||
unchanged since a <i>tuple </i>must have at least one element.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_WHILE</b> interally. Therefore, to
|
||||
use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
|
||||
see <b>BOOST_PP_TUPLE_REMOVE_D</b>.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_remove_d.html">BOOST_PP_TUPLE_REMOVE_D</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/remove.html"><boost/preprocessor/tuple/remove.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/remove.html">boost/preprocessor/tuple/remove.hpp</a>>
|
||||
|
||||
#define TUPLE (a, b, d)
|
||||
|
||||
<a href="tuple_remove.html">BOOST_PP_TUPLE_REMOVE</a>(TUPLE, 2) // expands to (a, b)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
41
doc/ref/tuple_remove_d.html
Normal file
41
doc/ref/tuple_remove_d.html
Normal file
@ -0,0 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_REMOVE_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REMOVE_D</b> macro
|
||||
removes an element from a <i>tuple</i>. It reenters <b>BOOST_PP_WHILE</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_REMOVE_D</b>(<i>d</i>, <i>tuple</i>,
|
||||
<i>i</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd> The next available <b>BOOST_PP_WHILE</b> iteration. </dd>
|
||||
<dt>tuple</dt>
|
||||
<dd> The <i>tuple</i> from which an element is to be removed. </dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> of the element to be
|
||||
removed. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>)
|
||||
- <i>1</i>. If <i>tuple</i> has only a single element, it remains
|
||||
unchanged since a <i>tuple </i>must have at least one element.</dd>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_remove.html">BOOST_PP_TUPLE_REMOVE</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/remove.html"><boost/preprocessor/tuple/remove.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
51
doc/ref/tuple_replace.html
Normal file
51
doc/ref/tuple_replace.html
Normal file
@ -0,0 +1,51 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_REPLACE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REPLACE</b> macro
|
||||
replaces an element in a <i>tuple</i>.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_REPLACE</b>(<i>tuple</i>, <i>i</i>, <i>elem</i>)
|
||||
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>tuple</dt>
|
||||
<dd> A <i>tuple</i> to replace an element in. </dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> of the element to be
|
||||
replaced. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>)
|
||||
- <i>1</i>.</dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The replacement element. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_WHILE</b> interally. Therefore, to
|
||||
use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
|
||||
see <b>BOOST_PP_TUPLE_REPLACE_D</b>.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_replace_d.html">BOOST_PP_TUPLE_REPLACE_D</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/replace.html"><boost/preprocessor/tuple/replace.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/tuple/replace.html">boost/preprocessor/tuple/replace.hpp</a>>
|
||||
|
||||
#define TUPLE (a, x, c)
|
||||
|
||||
<a href="tuple_replace.html">BOOST_PP_TUPLE_REPLACE</a>(TUPLE, 1, b) // expands to (a, b, c))
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
42
doc/ref/tuple_replace_d.html
Normal file
42
doc/ref/tuple_replace_d.html
Normal file
@ -0,0 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_TUPLE_REPLACE_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REPLACE_D</b> macro
|
||||
replaces an element in a <i>tuple</i>. It reenters <b>BOOST_PP_WHILE</b>
|
||||
with maximum efficiency.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_TUPLE_REPLACE_D</b>(<i>d</i>, <i>tuple</i>,
|
||||
<i>i</i>, <i>elem</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd> The next available <b>BOOST_PP_WHILE</b> iteration. </dd>
|
||||
<dt>tuple</dt>
|
||||
<dd> A <i>tuple</i> to replace an element in. </dd>
|
||||
<dt>i</dt>
|
||||
<dd> The zero-based position in <i>tuple</i> of the element to be
|
||||
replaced. Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>)
|
||||
- <i>1</i>. </dd>
|
||||
<dt>elem</dt>
|
||||
<dd> The replacement element. </dd>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="tuple_replace.html">BOOST_PP_TUPLE_REPLACE</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/tuple/replace.html"><boost/preprocessor/tuple/replace.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2013</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>
|
@ -5,18 +5,21 @@
|
||||
</head>
|
||||
<body>
|
||||
<h4>Introduction</h4>
|
||||
<div>
|
||||
An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and 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" target="_top"><font color="blue"><b><u><i>online</i></u></font></b></a>.
|
||||
This excerpt contains a basic introduction to the Preprocessor 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.
|
||||
<div> The Boost Preprocessing library is a library of macros, with support
|
||||
for preprocessor metaprogramming. The library supports both C++ and C
|
||||
compilation. It does not depend on any other Boost libraries and therefore
|
||||
may be used as a standalone library. </div>
|
||||
<div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and
|
||||
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"
|
||||
target="_top"><font color="blue"><b><u><i>online</i></u></b></font></a>.
|
||||
This excerpt contains a basic introduction to the Preprocessor 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.
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002
|
||||
<EFBFBD> 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)
|
||||
-->
|
||||
|
||||
<EFBFBD> Copyright Housemarque Oy 2002<EFBFBD> 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)-->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -13,7 +13,7 @@ They are
|
||||
macros of the form:
|
||||
</div>
|
||||
<div class="code">
|
||||
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__<br></pre>
|
||||
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__</pre>
|
||||
</div>
|
||||
<div> The '...' in the parameter list represents the variadic
|
||||
data when the macro is invoked and the __VA_ARGS__ in the expansion
|
||||
@ -32,7 +32,7 @@ arguments to the macro.<br>
|
||||
</div>
|
||||
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
||||
<div class="code">
|
||||
<pre>#define INITIALIZE_INT_ARRAY(array_name,...) \ <br> static int array_name[] = { __VA_ARGS__ }; \ <br> /**/<br><br> INITIALIZE_INT_ARRAY(myname,45,789,33510,9346,2)<br></pre>
|
||||
<pre>#define INITIALIZE_INT_ARRAY(array_name,...) \ <br> static int array_name[] = { __VA_ARGS__ }; \ <br> /**/<br><br> INITIALIZE_INT_ARRAY(myname,45,789,33510,9346,2)</pre>
|
||||
</div>
|
||||
<u> <span style="font-weight: bold;">Preprocessor
|
||||
Library Support<br>
|
||||
@ -64,6 +64,7 @@ other library data types, since the
|
||||
functionality for working with those Boost preprocessor library data
|
||||
types is much greater than that for working with variadic data directly.<br>
|
||||
</div>
|
||||
<a name="VNotation"></a>
|
||||
<h4>Notation For Variadic Macros<br>
|
||||
</h4>
|
||||
<div>In the documentation, headers which have variadic macros,
|
||||
@ -72,9 +73,7 @@ variadic macros themselves, have a notation of '(v)' appended to them.
|
||||
For the variadic macros themselves this signifies that
|
||||
BOOST_PP_VARIADICS must be 1 for those variadic macros to be usable.
|
||||
For variadic macros which have a non-variadic equivalent, the
|
||||
non-variadic equivalent will be used if BOOST_PP_VARIADICS is set to 0
|
||||
and the non-variadic version of the
|
||||
macro does not have a '(v)' appended to its name in the documentation.
|
||||
non-variadic equivalent will be used if BOOST_PP_VARIADICS is set to 0.
|
||||
</div>
|
||||
<h4>Extended Functionality Using Variadic Macros<br>
|
||||
</h4>
|
||||
@ -132,6 +131,19 @@ BOOST_PP_SEQ_ENUM, and BOOST_PP_TUPLE_ENUM. However if one wishes to
|
||||
use this variadic data reliably as arguments to other macros, one needs
|
||||
variadic macro support.<br>
|
||||
</div>
|
||||
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
||||
</u>
|
||||
<div>An array as a preprocessor data type is a two-element tuple where the
|
||||
first element is the array size and the second element is a tuple which
|
||||
constitutes the array data. Because a tuple knows its own size when the
|
||||
compiler supports variadic macros, there is no reason to use the array preprocessor
|
||||
data type as opposed to the tuple preprocessor data type; the tuple data
|
||||
type now has all of the functionality which the array data type has and is
|
||||
syntactically easier to use. With variadic macro support, which is now
|
||||
officially part of the latest C++ standard, the preprocessor array data
|
||||
type is essentially obsolete for conforming C++ compilers. Only if your
|
||||
compiler does not support variadic macros is the preprocessor array data
|
||||
type still useful.</div>
|
||||
<u style="font-weight: bold;">Using Variadic Data</u>
|
||||
<div>Variadic data exists in the
|
||||
form of comma-separated preprocessor tokens. This is the case whether
|
||||
@ -177,7 +189,8 @@ First an example of what NOT to do.<br>
|
||||
non-variadic
|
||||
macro. DO NOT DO.</u></h4>
|
||||
<div class="code">
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following should not be done and is not guaranteed to work with compilers. */<br><br><span style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));<br></pre>
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following should not be done and is not guaranteed to work with compilers. */<br><br><span
|
||||
style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
||||
</div>
|
||||
<div> There are two ways to pass variadic data to a non-variadic
|
||||
macro.
|
||||
@ -204,7 +217,8 @@ and on to a non-variadic macro.<br>
|
||||
</u></h4>
|
||||
<div class="code">
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3));<br><br>/* For Visual C++ it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
|
||||
</div><br>
|
||||
</div>
|
||||
<br>
|
||||
<div>Although these techniques will work when passing variadic
|
||||
data to
|
||||
non-variadic macros, it is much better and less problematical to
|
||||
@ -231,7 +245,7 @@ Macros<br>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
||||
Edward Diener
|
||||
2011</i> </div>
|
||||
2011,2013</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License,
|
||||
Version 1.0.
|
||||
|
@ -72,16 +72,15 @@
|
||||
#
|
||||
# if !defined BOOST_PP_VARIADICS
|
||||
# /* variadic support explicitly disabled for all untested compilers */
|
||||
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || 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 || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
|
||||
# define BOOST_PP_VARIADICS 0
|
||||
# /* Clang, all versions */
|
||||
# elif defined __clang__
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# /* VC++ (C/C++) */
|
||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
|
||||
# if _MSC_VER >= 1400
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# else
|
||||
# define BOOST_PP_VARIADICS 0
|
||||
# endif
|
||||
# /* Wave (C/C++), GCC (C++) */
|
||||
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
|
@ -8,7 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
# /* Revised by Edward Diener (2011,2013) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -18,7 +18,14 @@
|
||||
# include <boost/preprocessor/tuple/eat.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/enum.hpp>
|
||||
# include <boost/preprocessor/tuple/insert.hpp>
|
||||
# include <boost/preprocessor/tuple/pop_back.hpp>
|
||||
# include <boost/preprocessor/tuple/pop_front.hpp>
|
||||
# include <boost/preprocessor/tuple/push_back.hpp>
|
||||
# include <boost/preprocessor/tuple/push_front.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/tuple/remove.hpp>
|
||||
# include <boost/preprocessor/tuple/replace.hpp>
|
||||
# include <boost/preprocessor/tuple/reverse.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
|
37
include/boost/preprocessor/tuple/insert.hpp
Normal file
37
include/boost/preprocessor/tuple/insert.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_INSERT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_INSERT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/insert.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_INSERT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_INSERT_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_INSERT_HPP
|
64
include/boost/preprocessor/tuple/pop_back.hpp
Normal file
64
include/boost/preprocessor/tuple/pop_back.hpp
Normal file
@ -0,0 +1,64 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_POP_BACK_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_POP_BACK_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/pop_back.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_BACK */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_RETURN(tuple) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_BACK_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_RETURN(z, tuple) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_POP_BACK_HPP
|
65
include/boost/preprocessor/tuple/pop_front.hpp
Normal file
65
include/boost/preprocessor/tuple/pop_front.hpp
Normal file
@ -0,0 +1,65 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_POP_FRONT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/pop_front.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_RETURN(tuple) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_RETURN(z, tuple) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
|
31
include/boost/preprocessor/tuple/push_back.hpp
Normal file
31
include/boost/preprocessor/tuple/push_back.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_PUSH_BACK_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/push_back.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_PUSH_BACK */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_PUSH_BACK(tuple, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP
|
32
include/boost/preprocessor/tuple/push_front.hpp
Normal file
32
include/boost/preprocessor/tuple/push_front.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_PUSH_FRONT_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/push_front.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_PUSH_FRONT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_PUSH_FRONT(tuple, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP
|
@ -1,7 +1,7 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002-2011. *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Edward Diener 2011,2013. *
|
||||
# * 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) *
|
||||
@ -27,7 +27,10 @@
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REM */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
/*
|
||||
VC++8.0 cannot handle the variadic version of BOOST_PP_TUPLE_REM(size)
|
||||
*/
|
||||
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER == 1400)
|
||||
# define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
|
64
include/boost/preprocessor/tuple/remove.hpp
Normal file
64
include/boost/preprocessor/tuple/remove.hpp
Normal file
@ -0,0 +1,64 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_REMOVE_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/remove.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/comparison/greater.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REMOVE */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE(tuple, i) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_REMOVE_EXEC, \
|
||||
BOOST_PP_TUPLE_REMOVE_RETURN \
|
||||
) \
|
||||
(tuple, i) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_EXEC(tuple, i) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REMOVE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_RETURN(tuple, i) tuple
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REMOVE_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D(d, tuple, i) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER_D(d, BOOST_PP_TUPLE_SIZE(tuple), 1), \
|
||||
BOOST_PP_TUPLE_REMOVE_D_EXEC, \
|
||||
BOOST_PP_TUPLE_REMOVE_D_RETURN \
|
||||
) \
|
||||
(d, tuple, i) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D_EXEC(d, tuple, i) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REMOVE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i)) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REMOVE_D_RETURN(d, tuple, i) tuple
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_REMOVE_HPP
|
37
include/boost/preprocessor/tuple/replace.hpp
Normal file
37
include/boost/preprocessor/tuple/replace.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * 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_TUPLE_REPLACE_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/replace.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
@ -18,6 +18,8 @@
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REVERSE */
|
||||
#
|
||||
@ -26,10 +28,11 @@
|
||||
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_TUPLE_REVERSE_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_REVERSE_I(m, args) BOOST_PP_TUPLE_REVERSE_II(m, args)
|
||||
# define BOOST_PP_TUPLE_REVERSE_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
|
@ -16,6 +16,7 @@
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
||||
@ -25,10 +26,11 @@
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_I(m, args) BOOST_PP_TUPLE_TO_ARRAY_II(m, args)
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY(size, tuple) (size, tuple)
|
||||
|
@ -18,6 +18,7 @@
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_TO_LIST */
|
||||
@ -27,10 +28,11 @@
|
||||
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args)
|
||||
# define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
|
@ -16,6 +16,7 @@
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_TO_SEQ */
|
||||
@ -25,10 +26,11 @@
|
||||
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_TUPLE_TO_SEQ_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_I(m, args) BOOST_PP_TUPLE_TO_SEQ_II(m, args)
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
|
@ -9,54 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic.hpp>
|
||||
# include <boost/preprocessor/config/limits.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
/* addition */
|
||||
|
||||
BEGIN BOOST_PP_ADD(2, 3) == 5 END
|
||||
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), 2) == 6 END
|
||||
BEGIN BOOST_PP_ADD(2, BOOST_PP_ADD(1, 4)) == 7 END
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), BOOST_PP_ADD(2, 2)) == 8 END
|
||||
|
||||
/* subtraction */
|
||||
|
||||
BEGIN BOOST_PP_SUB(11, 0) == 11 END
|
||||
BEGIN BOOST_PP_SUB(12, 1) == 11 END
|
||||
BEGIN BOOST_PP_SUB(3, 4) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_SUB(5, BOOST_PP_SUB(3, 2)) == 4 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(10, 5), 2) == 3 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(7, 3), BOOST_PP_SUB(10, 8)) == 2 END
|
||||
|
||||
/* multiplication */
|
||||
|
||||
BEGIN BOOST_PP_MUL(0, 1) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 0) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 1) == 1 END
|
||||
BEGIN BOOST_PP_MUL(4, 3) == 12 END
|
||||
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), 2) == 8 END
|
||||
BEGIN BOOST_PP_MUL(2, BOOST_PP_MUL(2, 2)) == 8 END
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), BOOST_PP_MUL(2, 2)) == 16 END
|
||||
|
||||
/* division */
|
||||
|
||||
BEGIN BOOST_PP_DIV(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_DIV(0, 5) == 0 END
|
||||
BEGIN BOOST_PP_DIV(7, 3) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(4, 2), 2) == 1 END
|
||||
BEGIN BOOST_PP_DIV(10, BOOST_PP_DIV(10, 2)) == 2 END
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(10, 2), BOOST_PP_DIV(4, 2)) == 2 END
|
||||
|
||||
/* modulus */
|
||||
|
||||
BEGIN BOOST_PP_MOD(5, 5) == 0 END
|
||||
BEGIN BOOST_PP_MOD(9, 5) == 4 END
|
||||
BEGIN BOOST_PP_MOD(7, 4) == 3 END
|
||||
|
||||
BEGIN BOOST_PP_MOD(BOOST_PP_MOD(5, 3), 3) == 2 END
|
||||
BEGIN BOOST_PP_MOD(5, BOOST_PP_MOD(4, 3)) == 0 END
|
||||
# include <libs/preprocessor/test/arithmetic.cxx>
|
||||
|
@ -9,54 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic.hpp>
|
||||
# include <boost/preprocessor/config/limits.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
// addition
|
||||
|
||||
BEGIN BOOST_PP_ADD(2, 3) == 5 END
|
||||
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), 2) == 6 END
|
||||
BEGIN BOOST_PP_ADD(2, BOOST_PP_ADD(1, 4)) == 7 END
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), BOOST_PP_ADD(2, 2)) == 8 END
|
||||
|
||||
// subtraction
|
||||
|
||||
BEGIN BOOST_PP_SUB(11, 0) == 11 END
|
||||
BEGIN BOOST_PP_SUB(12, 1) == 11 END
|
||||
BEGIN BOOST_PP_SUB(3, 4) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_SUB(5, BOOST_PP_SUB(3, 2)) == 4 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(10, 5), 2) == 3 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(7, 3), BOOST_PP_SUB(10, 8)) == 2 END
|
||||
|
||||
// multiplication
|
||||
|
||||
BEGIN BOOST_PP_MUL(0, 1) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 0) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 1) == 1 END
|
||||
BEGIN BOOST_PP_MUL(4, 3) == 12 END
|
||||
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), 2) == 8 END
|
||||
BEGIN BOOST_PP_MUL(2, BOOST_PP_MUL(2, 2)) == 8 END
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), BOOST_PP_MUL(2, 2)) == 16 END
|
||||
|
||||
// division
|
||||
|
||||
BEGIN BOOST_PP_DIV(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_DIV(0, 5) == 0 END
|
||||
BEGIN BOOST_PP_DIV(7, 3) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(4, 2), 2) == 1 END
|
||||
BEGIN BOOST_PP_DIV(10, BOOST_PP_DIV(10, 2)) == 2 END
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(10, 2), BOOST_PP_DIV(4, 2)) == 2 END
|
||||
|
||||
// modulus
|
||||
|
||||
BEGIN BOOST_PP_MOD(5, 5) == 0 END
|
||||
BEGIN BOOST_PP_MOD(9, 5) == 4 END
|
||||
BEGIN BOOST_PP_MOD(7, 4) == 3 END
|
||||
|
||||
BEGIN BOOST_PP_MOD(BOOST_PP_MOD(5, 3), 3) == 2 END
|
||||
BEGIN BOOST_PP_MOD(5, BOOST_PP_MOD(4, 3)) == 0 END
|
||||
# include <libs/preprocessor/test/arithmetic.cxx>
|
||||
|
82
test/arithmetic.cxx
Normal file
82
test/arithmetic.cxx
Normal file
@ -0,0 +1,82 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic.hpp>
|
||||
# include <boost/preprocessor/config/limits.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
/* addition */
|
||||
|
||||
BEGIN BOOST_PP_ADD(2, 3) == 5 END
|
||||
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), 2) == 6 END
|
||||
BEGIN BOOST_PP_ADD(2, BOOST_PP_ADD(1, 4)) == 7 END
|
||||
BEGIN BOOST_PP_ADD(BOOST_PP_ADD(2, 2), BOOST_PP_ADD(2, 2)) == 8 END
|
||||
|
||||
/* subtraction */
|
||||
|
||||
BEGIN BOOST_PP_SUB(11, 0) == 11 END
|
||||
BEGIN BOOST_PP_SUB(12, 1) == 11 END
|
||||
BEGIN BOOST_PP_SUB(3, 4) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_SUB(5, BOOST_PP_SUB(3, 2)) == 4 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(10, 5), 2) == 3 END
|
||||
BEGIN BOOST_PP_SUB(BOOST_PP_SUB(7, 3), BOOST_PP_SUB(10, 8)) == 2 END
|
||||
|
||||
/* multiplication */
|
||||
|
||||
BEGIN BOOST_PP_MUL(0, 1) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 0) == 0 END
|
||||
BEGIN BOOST_PP_MUL(1, 1) == 1 END
|
||||
BEGIN BOOST_PP_MUL(4, 3) == 12 END
|
||||
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), 2) == 8 END
|
||||
BEGIN BOOST_PP_MUL(2, BOOST_PP_MUL(2, 2)) == 8 END
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(2, 2), BOOST_PP_MUL(2, 2)) == 16 END
|
||||
|
||||
/* division */
|
||||
|
||||
BEGIN BOOST_PP_DIV(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_DIV(0, 5) == 0 END
|
||||
BEGIN BOOST_PP_DIV(7, 3) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(4, 2), 2) == 1 END
|
||||
BEGIN BOOST_PP_DIV(10, BOOST_PP_DIV(10, 2)) == 2 END
|
||||
BEGIN BOOST_PP_DIV(BOOST_PP_DIV(10, 2), BOOST_PP_DIV(4, 2)) == 2 END
|
||||
|
||||
/* modulus */
|
||||
|
||||
BEGIN BOOST_PP_MOD(5, 5) == 0 END
|
||||
BEGIN BOOST_PP_MOD(9, 5) == 4 END
|
||||
BEGIN BOOST_PP_MOD(7, 4) == 3 END
|
||||
|
||||
BEGIN BOOST_PP_MOD(BOOST_PP_MOD(5, 3), 3) == 2 END
|
||||
BEGIN BOOST_PP_MOD(5, BOOST_PP_MOD(4, 3)) == 0 END
|
||||
|
||||
/* increment */
|
||||
|
||||
BEGIN BOOST_PP_INC(0) == 1 END
|
||||
BEGIN BOOST_PP_INC(22) == 23 END
|
||||
BEGIN BOOST_PP_INC(256) == 256 END
|
||||
|
||||
BEGIN BOOST_PP_INC(BOOST_PP_INC(0)) == 2 END
|
||||
BEGIN BOOST_PP_INC(BOOST_PP_INC(17)) == 19 END
|
||||
BEGIN BOOST_PP_INC(BOOST_PP_INC(255)) == 256 END
|
||||
|
||||
/* decrement */
|
||||
|
||||
BEGIN BOOST_PP_DEC(256) == 255 END
|
||||
BEGIN BOOST_PP_DEC(47) == 46 END
|
||||
BEGIN BOOST_PP_DEC(0) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_DEC(BOOST_PP_DEC(256)) == 254 END
|
||||
BEGIN BOOST_PP_DEC(BOOST_PP_DEC(85)) == 83 END
|
||||
BEGIN BOOST_PP_DEC(BOOST_PP_DEC(1)) == 0 END
|
81
test/array.c
81
test/array.c
@ -11,83 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/array.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
|
||||
# define ARRAY (3, (0, 1, 2))
|
||||
# define ARRAY_LARGE (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))
|
||||
# define ARRAY_VERY_LARGE (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))
|
||||
|
||||
// element access
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(1, ARRAY) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, (5, (0, 1, 2, 3, 4))) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(28, ARRAY_LARGE) == 28 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(17, (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 17 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(42, ARRAY_VERY_LARGE) == 42 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(62, (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 62 END
|
||||
|
||||
// size
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 64 END
|
||||
|
||||
// enum
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_ARRAY_ENUM(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(3,BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(31,BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(13,BOOST_PP_ARRAY_ENUM((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)))) == 13 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(39,BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 39 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(24,BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 24 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 64 END
|
||||
|
||||
# endif
|
||||
|
||||
// to_list
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((5, (0, 1, 2, 3, 4))), 4) == 4 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))), 26) == 26 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY_VERY_LARGE), 60) == 60 END
|
||||
|
||||
// to_seq
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(0, BOOST_PP_ARRAY_TO_SEQ(ARRAY)) == 0 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_ARRAY_TO_SEQ((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(17, BOOST_PP_ARRAY_TO_SEQ(ARRAY_LARGE)) == 17 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(42, BOOST_PP_ARRAY_TO_SEQ((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 42 END
|
||||
|
||||
// to_tuple
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# else
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, 1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# endif
|
||||
# include <libs/preprocessor/test/array.cxx>
|
||||
|
@ -11,83 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/array.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
|
||||
# define ARRAY (3, (0, 1, 2))
|
||||
# define ARRAY_LARGE (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))
|
||||
# define ARRAY_VERY_LARGE (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))
|
||||
|
||||
// element access
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(1, ARRAY) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, (5, (0, 1, 2, 3, 4))) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(28, ARRAY_LARGE) == 28 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(17, (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 17 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(42, ARRAY_VERY_LARGE) == 42 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(62, (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 62 END
|
||||
|
||||
// size
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 64 END
|
||||
|
||||
// enum
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_ARRAY_ENUM(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(3,BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(31,BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(13,BOOST_PP_ARRAY_ENUM((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)))) == 13 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(39,BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 39 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(24,BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 24 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 64 END
|
||||
|
||||
# endif
|
||||
|
||||
// to_list
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((5, (0, 1, 2, 3, 4))), 4) == 4 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))), 26) == 26 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY_VERY_LARGE), 60) == 60 END
|
||||
|
||||
// to_seq
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(0, BOOST_PP_ARRAY_TO_SEQ(ARRAY)) == 0 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_ARRAY_TO_SEQ((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(17, BOOST_PP_ARRAY_TO_SEQ(ARRAY_LARGE)) == 17 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(42, BOOST_PP_ARRAY_TO_SEQ((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 42 END
|
||||
|
||||
// to_tuple
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# else
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, 1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# endif
|
||||
# include <libs/preprocessor/test/array.cxx>
|
||||
|
159
test/array.cxx
Normal file
159
test/array.cxx
Normal file
@ -0,0 +1,159 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* Revised by Edward Diener (2011,2013) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/array.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
|
||||
# define ARRAY (3, (0, 1, 2))
|
||||
# define ARRAY_LARGE (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))
|
||||
# define ARRAY_VERY_LARGE (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))
|
||||
|
||||
// element access
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(1, ARRAY) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, (5, (0, 1, 2, 3, 4))) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(28, ARRAY_LARGE) == 28 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(17, (33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 17 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(42, ARRAY_VERY_LARGE) == 42 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(62, (64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 62 END
|
||||
|
||||
// size
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((5, (0, 1, 2, 3, 4))) == 5 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))) == 33 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))) == 64 END
|
||||
|
||||
// enum
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_ARRAY_ENUM(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(3,BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(31,BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(13,BOOST_PP_ARRAY_ENUM((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)))) == 13 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(39,BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 39 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(24,BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 24 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 64 END
|
||||
|
||||
# endif
|
||||
|
||||
// to_list
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((5, (0, 1, 2, 3, 4))), 4) == 4 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST((33, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32))), 26) == 26 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY_VERY_LARGE), 60) == 60 END
|
||||
|
||||
// to_seq
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(0, BOOST_PP_ARRAY_TO_SEQ(ARRAY)) == 0 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_ARRAY_TO_SEQ((5, (0, 1, 2, 3, 4)))) == 3 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(17, BOOST_PP_ARRAY_TO_SEQ(ARRAY_LARGE)) == 17 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(42, BOOST_PP_ARRAY_TO_SEQ((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 42 END
|
||||
|
||||
// to_tuple
|
||||
|
||||
# if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# else
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, 1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 37, BOOST_PP_ARRAY_TO_TUPLE((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 37 END
|
||||
|
||||
# endif
|
||||
|
||||
// insert
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_INSERT(ARRAY,2,40)) == 0 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ARRAY_INSERT(ARRAY,1,40)) == 40 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ARRAY_INSERT(ARRAY,1,40)) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_INSERT(ARRAY,1,40)) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(8, BOOST_PP_ARRAY_INSERT(ARRAY_LARGE,22,1000)) == 8 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(22, BOOST_PP_ARRAY_INSERT(ARRAY_LARGE,22,1000)) == 1000 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(26, BOOST_PP_ARRAY_INSERT(ARRAY_LARGE,22,1000)) == 25 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_INSERT(ARRAY_LARGE,22,1000)) == 34 END
|
||||
|
||||
// pop_back
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_BACK(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_BACK(ARRAY_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_BACK(ARRAY_VERY_LARGE)) == 63 END
|
||||
|
||||
// pop_front
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_FRONT(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_FRONT(ARRAY_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_FRONT(ARRAY_VERY_LARGE)) == 63 END
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ARRAY_POP_FRONT(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(31, BOOST_PP_ARRAY_POP_FRONT(ARRAY_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(55, BOOST_PP_ARRAY_POP_FRONT(ARRAY_VERY_LARGE)) == 56 END
|
||||
|
||||
// push_back
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_PUSH_BACK(ARRAY, 3)) == 4 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_PUSH_BACK(ARRAY_LARGE, 33)) == 34 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_PUSH_BACK(ARRAY, 3)) == 0 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(33, BOOST_PP_ARRAY_PUSH_BACK(ARRAY_LARGE, 33)) == 33 END
|
||||
|
||||
// push_front
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_PUSH_FRONT(ARRAY, 555)) == 4 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_PUSH_FRONT(ARRAY_LARGE, 666)) == 34 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_PUSH_FRONT(ARRAY, 555)) == 555 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(33, BOOST_PP_ARRAY_PUSH_FRONT(ARRAY_LARGE, 33)) == 32 END
|
||||
|
||||
// remove
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REMOVE(ARRAY, 1)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REMOVE(ARRAY_LARGE, 17)) == 32 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REMOVE(ARRAY_VERY_LARGE, 27)) == 63 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REMOVE(ARRAY, 2)) == 0 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29, BOOST_PP_ARRAY_REMOVE(ARRAY_LARGE, 25)) == 30 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(62, BOOST_PP_ARRAY_REMOVE(ARRAY_VERY_LARGE, 48)) == 63 END
|
||||
|
||||
// replace
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REPLACE(ARRAY_VERY_LARGE, 27, 1000)) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REPLACE(ARRAY, 1, 44)) == 0 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29, BOOST_PP_ARRAY_REPLACE(ARRAY_LARGE, 29, 999)) == 999 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(38, BOOST_PP_ARRAY_REPLACE(ARRAY_VERY_LARGE, 37, 1)) == 38 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(28, BOOST_PP_ARRAY_REPLACE(ARRAY_VERY_LARGE, 28, 1)) == 1 END
|
||||
|
||||
// reverse
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29, BOOST_PP_ARRAY_REVERSE(ARRAY_LARGE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(38, BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 25 END
|
@ -9,37 +9,5 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/comparison.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <libs/preprocessor/test/comparison.cxx>
|
||||
|
||||
/* equality */
|
||||
|
||||
BEGIN BOOST_PP_EQUAL(2, 0) == 0 END
|
||||
BEGIN BOOST_PP_EQUAL(2, 2) == 1 END
|
||||
|
||||
/* inequality */
|
||||
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END
|
||||
|
||||
/* less */
|
||||
|
||||
BEGIN BOOST_PP_LESS(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS(1, 2) == 1 END
|
||||
|
||||
/* less_equal */
|
||||
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END
|
||||
|
||||
/* greater */
|
||||
|
||||
BEGIN BOOST_PP_GREATER(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER(1, 2) == 0 END
|
||||
|
||||
/* greater_equal */
|
||||
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END
|
||||
|
@ -9,37 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/comparison.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
// equality
|
||||
|
||||
BEGIN BOOST_PP_EQUAL(2, 0) == 0 END
|
||||
BEGIN BOOST_PP_EQUAL(2, 2) == 1 END
|
||||
|
||||
// inequality
|
||||
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END
|
||||
|
||||
// less
|
||||
|
||||
BEGIN BOOST_PP_LESS(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS(1, 2) == 1 END
|
||||
|
||||
// less_equal
|
||||
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END
|
||||
|
||||
// greater
|
||||
|
||||
BEGIN BOOST_PP_GREATER(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER(1, 2) == 0 END
|
||||
|
||||
// greater_equal
|
||||
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END
|
||||
# include <libs/preprocessor/test/comparison.cxx>
|
||||
|
45
test/comparison.cxx
Normal file
45
test/comparison.cxx
Normal file
@ -0,0 +1,45 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/comparison.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
/* equality */
|
||||
|
||||
BEGIN BOOST_PP_EQUAL(2, 0) == 0 END
|
||||
BEGIN BOOST_PP_EQUAL(2, 2) == 1 END
|
||||
|
||||
/* inequality */
|
||||
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END
|
||||
|
||||
/* less */
|
||||
|
||||
BEGIN BOOST_PP_LESS(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS(1, 2) == 1 END
|
||||
|
||||
/* less_equal */
|
||||
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END
|
||||
BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END
|
||||
|
||||
/* greater */
|
||||
|
||||
BEGIN BOOST_PP_GREATER(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER(1, 2) == 0 END
|
||||
|
||||
/* greater_equal */
|
||||
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END
|
||||
BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END
|
@ -9,32 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/control.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TR(x) 1
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END
|
||||
BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END
|
||||
BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IF(9, 1, 0) == 1 END
|
||||
|
||||
# define PRED(d, state) state
|
||||
# define OP_1(d, state) BOOST_PP_DEC(state)
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END
|
||||
|
||||
# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state))
|
||||
# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state))
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_2, 10) == 0 END
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END
|
||||
# include <libs/preprocessor/test/control.cxx>
|
||||
|
@ -9,32 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/control.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TR(x) 1
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END
|
||||
BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END
|
||||
BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IF(9, 1, 0) == 1 END
|
||||
|
||||
# define PRED(d, state) state
|
||||
# define OP_1(d, state) BOOST_PP_DEC(state)
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END
|
||||
|
||||
# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state))
|
||||
# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state))
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_2, 10) == 0 END
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END
|
||||
# include <libs/preprocessor/test/control.cxx>
|
||||
|
40
test/control.cxx
Normal file
40
test/control.cxx
Normal file
@ -0,0 +1,40 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/control.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TR(x) 1
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END
|
||||
BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END
|
||||
BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IF(0, 1, 0) == 0 END
|
||||
BEGIN BOOST_PP_IF(9, 1, 0) == 1 END
|
||||
|
||||
# define PRED(d, state) state
|
||||
# define OP_1(d, state) BOOST_PP_DEC(state)
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END
|
||||
|
||||
# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state))
|
||||
# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state))
|
||||
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_2, 10) == 0 END
|
||||
BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END
|
11
test/debug.c
11
test/debug.c
@ -9,13 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/debug.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(0, "text") "") / sizeof(char) != 1 END
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(1, "text") "") / sizeof(char) == 1 END
|
||||
|
||||
BOOST_PP_ASSERT(10)
|
||||
|
||||
# line BOOST_PP_LINE(100, __FILE__)
|
||||
BEGIN __LINE__ == 100 END
|
||||
# include <libs/preprocessor/test/debug.cxx>
|
||||
|
@ -9,13 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/debug.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(0, "text") "") / sizeof(char) != 1 END
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(1, "text") "") / sizeof(char) == 1 END
|
||||
|
||||
BOOST_PP_ASSERT(10)
|
||||
|
||||
# line BOOST_PP_LINE(100, __FILE__)
|
||||
BEGIN __LINE__ == 100 END
|
||||
# include <libs/preprocessor/test/debug.cxx>
|
||||
|
21
test/debug.cxx
Normal file
21
test/debug.cxx
Normal file
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/debug.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(0, "text") "") / sizeof(char) != 1 END
|
||||
BEGIN sizeof(BOOST_PP_ASSERT_MSG(1, "text") "") / sizeof(char) == 1 END
|
||||
|
||||
BOOST_PP_ASSERT(10)
|
||||
|
||||
# line BOOST_PP_LINE(100, __FILE__)
|
||||
BEGIN __LINE__ == 100 END
|
@ -9,20 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/facilities.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_APPLY(BOOST_PP_NIL) 0 == 0 END
|
||||
BEGIN BOOST_PP_APPLY((0)) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_APPLY((BOOST_PP_EMPTY))() 0 == 0 END
|
||||
|
||||
# define MACRO(x, y, z) 1
|
||||
# define ARGS (1, 2, 3)
|
||||
|
||||
BEGIN BOOST_PP_EXPAND(MACRO ARGS) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IDENTITY(1)() == 1 END
|
||||
|
||||
BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END
|
||||
# include <libs/preprocessor/test/facilities.cxx>
|
||||
|
@ -9,20 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/facilities.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_APPLY(BOOST_PP_NIL) 0 == 0 END
|
||||
BEGIN BOOST_PP_APPLY((0)) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_APPLY((BOOST_PP_EMPTY))() 0 == 0 END
|
||||
|
||||
# define MACRO(x, y, z) 1
|
||||
# define ARGS (1, 2, 3)
|
||||
|
||||
BEGIN BOOST_PP_EXPAND(MACRO ARGS) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IDENTITY(1)() == 1 END
|
||||
|
||||
BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END
|
||||
# include <libs/preprocessor/test/facilities.cxx>
|
||||
|
54
test/facilities.cxx
Normal file
54
test/facilities.cxx
Normal file
@ -0,0 +1,54 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/facilities.hpp>
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/mul.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_APPLY(BOOST_PP_NIL) 0 == 0 END
|
||||
BEGIN BOOST_PP_APPLY((0)) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_APPLY((BOOST_PP_EMPTY))() 0 == 0 END
|
||||
|
||||
# define MACRO(x, y, z) 1
|
||||
# define ARGS (1, 2, 3)
|
||||
|
||||
BEGIN BOOST_PP_EXPAND(MACRO ARGS) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_IDENTITY(1)() == 1 END
|
||||
|
||||
BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#define OVMAC_1(x) BOOST_PP_ADD(x,5)
|
||||
#define OVMAC_2(x,y) BOOST_PP_ADD(x,y)
|
||||
#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))
|
||||
|
||||
#if defined(BOOST_PP_VARIADICS_MSVC)
|
||||
|
||||
#define OVTEST(...) BOOST_PP_CAT(BOOST_PP_OVERLOAD(OVMAC_,__VA_ARGS__)(__VA_ARGS__),BOOST_PP_EMPTY())
|
||||
|
||||
#else
|
||||
|
||||
#define OVTEST(...) BOOST_PP_OVERLOAD(OVMAC_,__VA_ARGS__)(__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN OVTEST(3,4,5) == 17 END
|
||||
BEGIN OVTEST(9,3,2,7) == 41 END
|
||||
BEGIN OVTEST(8) == 13 END
|
||||
BEGIN OVTEST(24,61) == 85 END
|
||||
|
||||
#endif
|
49
test/list.c
49
test/list.c
@ -11,51 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/list.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define LIST (4, (1, (5, (2, BOOST_PP_NIL))))
|
||||
|
||||
# define REVERSAL(d, x, y) BOOST_PP_SUB_D(d, y, x)
|
||||
|
||||
BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(REVERSAL, 0, LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(LIST)) == 2514 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2, LIST)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(LIST, 2) == 5 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH(F1, 1, LIST) == 16 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_LIST_TO_TUPLE(LIST)) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LIST)) == 45 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x)
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END
|
||||
|
||||
# define L1 (0, (x, BOOST_PP_NIL))
|
||||
# define L2 (a, (1, (b, (2, BOOST_PP_NIL))))
|
||||
# define L3 (c, (3, (d, BOOST_PP_NIL)))
|
||||
|
||||
# define LL (L1, (L2, (L3, BOOST_PP_NIL)))
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, BOOST_PP_LIST_TO_ARRAY(LIST)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_LIST_TO_SEQ(LIST)) == 2 END
|
||||
# include <libs/preprocessor/test/list.cxx>
|
||||
|
@ -11,51 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/list.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define LIST (4, (1, (5, (2, BOOST_PP_NIL))))
|
||||
|
||||
# define REVERSAL(d, x, y) BOOST_PP_SUB_D(d, y, x)
|
||||
|
||||
BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(REVERSAL, 0, LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(LIST)) == 2514 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2, LIST)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(LIST, 2) == 5 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH(F1, 1, LIST) == 16 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_LIST_TO_TUPLE(LIST)) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LIST)) == 45 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x)
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END
|
||||
|
||||
# define L1 (0, (x, BOOST_PP_NIL))
|
||||
# define L2 (a, (1, (b, (2, BOOST_PP_NIL))))
|
||||
# define L3 (c, (3, (d, BOOST_PP_NIL)))
|
||||
|
||||
# define LL (L1, (L2, (L3, BOOST_PP_NIL)))
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, BOOST_PP_LIST_TO_ARRAY(LIST)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_LIST_TO_SEQ(LIST)) == 2 END
|
||||
# include <libs/preprocessor/test/list.cxx>
|
||||
|
80
test/list.cxx
Normal file
80
test/list.cxx
Normal file
@ -0,0 +1,80 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/equal.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/list.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define LISTNIL BOOST_PP_NIL
|
||||
# define LIST (4, (1, (5, (2, BOOST_PP_NIL))))
|
||||
|
||||
# define REVERSAL(d, x, y) BOOST_PP_SUB_D(d, y, x)
|
||||
|
||||
BEGIN BOOST_PP_LIST_FIRST(LIST) == 4 END
|
||||
BEGIN BOOST_PP_LIST_IS_CONS(LIST) == 1 END
|
||||
BEGIN BOOST_PP_LIST_IS_CONS(LISTNIL) == 0 END
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(LIST) == 0 END
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(LISTNIL) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_LIST_ENUM(LIST)) == 5 END
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(REVERSAL, 0, LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REVERSE(LIST)) == 2514 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FIRST_N(2, LIST)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(LIST, 2) == 5 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(LIST) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
# define FI2(r, state, i, x) BOOST_PP_IIF(BOOST_PP_EQUAL(i,1),+ x + x + state,+ x + state)
|
||||
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH(F1, 1, LIST) == 16 END
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH_I(FI2, 1, LIST) == 17 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_LIST_TO_TUPLE(LIST)) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LIST)) == 45 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x)
|
||||
BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END
|
||||
|
||||
# define L1 (0, (x, BOOST_PP_NIL))
|
||||
# define L2 (a, (1, (b, (2, BOOST_PP_NIL))))
|
||||
# define L3 (c, (3, (d, BOOST_PP_NIL)))
|
||||
|
||||
# define LL (L1, (L2, (L3, BOOST_PP_NIL)))
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(2, BOOST_PP_LIST_TO_ARRAY(LIST)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_LIST_TO_SEQ(LIST)) == 2 END
|
@ -9,28 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/logical.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_NOT(0) == 1 END
|
||||
BEGIN BOOST_PP_NOT(2) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_AND(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(0, 3) == 0 END
|
||||
BEGIN BOOST_PP_AND(4, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(5, 6) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_OR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_OR(0, 7) == 1 END
|
||||
BEGIN BOOST_PP_OR(8, 0) == 1 END
|
||||
BEGIN BOOST_PP_OR(9, 1) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_XOR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_XOR(0, 2) == 1 END
|
||||
BEGIN BOOST_PP_XOR(3, 0) == 1 END
|
||||
BEGIN BOOST_PP_XOR(4, 5) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_NOR(0, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOR(0, 6) == 0 END
|
||||
BEGIN BOOST_PP_NOR(7, 0) == 0 END
|
||||
BEGIN BOOST_PP_NOR(8, 9) == 0 END
|
||||
# include <libs/preprocessor/test/logical.cxx>
|
||||
|
@ -9,28 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/logical.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_NOT(0) == 1 END
|
||||
BEGIN BOOST_PP_NOT(2) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_AND(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(0, 3) == 0 END
|
||||
BEGIN BOOST_PP_AND(4, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(5, 6) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_OR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_OR(0, 7) == 1 END
|
||||
BEGIN BOOST_PP_OR(8, 0) == 1 END
|
||||
BEGIN BOOST_PP_OR(9, 1) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_XOR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_XOR(0, 2) == 1 END
|
||||
BEGIN BOOST_PP_XOR(3, 0) == 1 END
|
||||
BEGIN BOOST_PP_XOR(4, 5) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_NOR(0, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOR(0, 6) == 0 END
|
||||
BEGIN BOOST_PP_NOR(7, 0) == 0 END
|
||||
BEGIN BOOST_PP_NOR(8, 9) == 0 END
|
||||
# include <libs/preprocessor/test/logical.cxx>
|
||||
|
59
test/logical.cxx
Normal file
59
test/logical.cxx
Normal file
@ -0,0 +1,59 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/logical.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_NOT(0) == 1 END
|
||||
BEGIN BOOST_PP_NOT(2) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_AND(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(0, 3) == 0 END
|
||||
BEGIN BOOST_PP_AND(4, 0) == 0 END
|
||||
BEGIN BOOST_PP_AND(5, 6) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_OR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_OR(0, 7) == 1 END
|
||||
BEGIN BOOST_PP_OR(8, 0) == 1 END
|
||||
BEGIN BOOST_PP_OR(9, 1) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_XOR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_XOR(0, 2) == 1 END
|
||||
BEGIN BOOST_PP_XOR(3, 0) == 1 END
|
||||
BEGIN BOOST_PP_XOR(4, 5) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_NOR(0, 0) == 1 END
|
||||
BEGIN BOOST_PP_NOR(0, 6) == 0 END
|
||||
BEGIN BOOST_PP_NOR(7, 0) == 0 END
|
||||
BEGIN BOOST_PP_NOR(8, 9) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_BOOL(22) == 1 END
|
||||
BEGIN BOOST_PP_BOOL(0) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_BITAND(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_BITAND(0, 1) == 0 END
|
||||
BEGIN BOOST_PP_BITAND(1, 0) == 0 END
|
||||
BEGIN BOOST_PP_BITAND(1, 1) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_BITNOR(0, 0) == 1 END
|
||||
BEGIN BOOST_PP_BITNOR(0, 1) == 0 END
|
||||
BEGIN BOOST_PP_BITNOR(1, 0) == 0 END
|
||||
BEGIN BOOST_PP_BITNOR(1, 1) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_BITOR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_BITOR(0, 1) == 1 END
|
||||
BEGIN BOOST_PP_BITOR(1, 0) == 1 END
|
||||
BEGIN BOOST_PP_BITOR(1, 1) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_BITXOR(0, 0) == 0 END
|
||||
BEGIN BOOST_PP_BITXOR(0, 1) == 1 END
|
||||
BEGIN BOOST_PP_BITXOR(1, 0) == 1 END
|
||||
BEGIN BOOST_PP_BITXOR(1, 1) == 0 END
|
@ -9,13 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/selection.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_MAX(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MAX(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_MAX(1, 2) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_MIN(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MIN(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_MIN(1, 2) == 1 END
|
||||
# include <libs/preprocessor/test/selection.cxx>
|
||||
|
@ -9,13 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/selection.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_MAX(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MAX(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_MAX(1, 2) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_MIN(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MIN(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_MIN(1, 2) == 1 END
|
||||
# include <libs/preprocessor/test/selection.cxx>
|
||||
|
21
test/selection.cxx
Normal file
21
test/selection.cxx
Normal file
@ -0,0 +1,21 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/selection.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
BEGIN BOOST_PP_MAX(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MAX(2, 1) == 2 END
|
||||
BEGIN BOOST_PP_MAX(1, 2) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_MIN(2, 2) == 2 END
|
||||
BEGIN BOOST_PP_MIN(2, 1) == 1 END
|
||||
BEGIN BOOST_PP_MIN(1, 2) == 1 END
|
78
test/seq.c
78
test/seq.c
@ -11,80 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/seq.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define SEQ (4)(1)(5)(2)
|
||||
|
||||
# define REVERSAL(s, x, y) BOOST_PP_SUB(y, x)
|
||||
# define SUB_S(s, x, y) BOOST_PP_SUB(x, y)
|
||||
# define ADD_S(s, x, y) BOOST_PP_ADD(x, y)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOLD_LEFT(SUB_S, 22, SEQ) == 10 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(ADD_S, 0, SEQ) == 12 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(REVERSAL, 0, SEQ) == 4 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_FIRST_N(2, SEQ)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(2, SEQ) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(SEQ) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM(ADD_S, 2, SEQ)) == 6374 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(SEQ) SEQ) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH(F1, 1, SEQ) == 16 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_SEQ_TO_TUPLE(SEQ)) == 2 END
|
||||
|
||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 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, 4, 3)) == 41523 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_BACK(SEQ)) == 415 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_FRONT(SEQ)) == 152 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ, 3)) == 34152 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ, 3)) == 41523 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, 3)) == 415 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, 3, 3)) == 4153 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, 1, 2)) == 15 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 2)) == 52 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_SEQ_ELEM(0, x) + 2 - BOOST_PP_SEQ_ELEM(1, x)
|
||||
|
||||
#define ADD_NIL(x) x(nil)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH_PRODUCT(F2, ((1)(0)) ((2)(3))) == 0 END
|
||||
|
||||
# define L1 (0)(x)
|
||||
# define L2 (a)(1)(b)(2)
|
||||
# define L3 (c)(3)(d)
|
||||
|
||||
# define LL (L1)(L2)(L3)
|
||||
|
||||
#define SEQ_APPEND(s, state, elem) state elem
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 0x0a1b2c3d END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 9 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ), 2) == 5 END
|
||||
# include <libs/preprocessor/test/seq.cxx>
|
||||
|
78
test/seq.cpp
78
test/seq.cpp
@ -11,80 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/seq.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define SEQ (4)(1)(5)(2)
|
||||
|
||||
# define REVERSAL(s, x, y) BOOST_PP_SUB(y, x)
|
||||
# define SUB_S(s, x, y) BOOST_PP_SUB(x, y)
|
||||
# define ADD_S(s, x, y) BOOST_PP_ADD(x, y)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOLD_LEFT(SUB_S, 22, SEQ) == 10 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(ADD_S, 0, SEQ) == 12 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(REVERSAL, 0, SEQ) == 4 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_FIRST_N(2, SEQ)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(2, SEQ) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(SEQ) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM(ADD_S, 2, SEQ)) == 6374 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(SEQ) SEQ) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH(F1, 1, SEQ) == 16 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_SEQ_TO_TUPLE(SEQ)) == 2 END
|
||||
|
||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 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, 4, 3)) == 41523 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_BACK(SEQ)) == 415 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_FRONT(SEQ)) == 152 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ, 3)) == 34152 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ, 3)) == 41523 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, 3)) == 415 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, 3, 3)) == 4153 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, 1, 2)) == 15 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 2)) == 52 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_SEQ_ELEM(0, x) + 2 - BOOST_PP_SEQ_ELEM(1, x)
|
||||
|
||||
#define ADD_NIL(x) x(nil)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH_PRODUCT(F2, ((1)(0)) ((2)(3))) == 0 END
|
||||
|
||||
# define L1 (0)(x)
|
||||
# define L2 (a)(1)(b)(2)
|
||||
# define L3 (c)(3)(d)
|
||||
|
||||
# define LL (L1)(L2)(L3)
|
||||
|
||||
#define SEQ_APPEND(s, state, elem) state elem
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 0x0a1b2c3d END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 9 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ), 2) == 5 END
|
||||
# include <libs/preprocessor/test/seq.cxx>
|
||||
|
107
test/seq.cxx
Normal file
107
test/seq.cxx
Normal file
@ -0,0 +1,107 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/comparison/equal.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/seq.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define SEQ (4)(1)(5)(2)
|
||||
# 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 SUB_S(s, x, y) BOOST_PP_SUB(x, y)
|
||||
# define ADD_S(s, x, y) BOOST_PP_ADD(x, y)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_HEAD(SEQ) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOLD_LEFT(SUB_S, 22, SEQ) == 10 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(ADD_S, 0, SEQ) == 12 END
|
||||
BEGIN BOOST_PP_SEQ_FOLD_RIGHT(REVERSAL, 0, SEQ) == 4 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_FIRST_N(2, SEQ)) == 41 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(2, SEQ) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(SEQ) == 4 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM(ADD_S, 2, SEQ)) == 6374 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(SEQ) SEQ) == 1524152 END
|
||||
|
||||
# define F1(r, state, x) + x + state
|
||||
# define FI2(r, state, i, x) BOOST_PP_IIF(BOOST_PP_EQUAL(i,2),+ x + x + state,+ x + state)
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH(F1, 1, SEQ) == 16 END
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH_I(FI2, 1, SEQ) == 21 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_SEQ_TO_TUPLE(SEQ)) == 2 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3, BOOST_PP_SEQ_TO_ARRAY(SEQ)) == 2 END
|
||||
|
||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 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, 4, 3)) == 41523 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_BACK(SEQ)) == 415 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_POP_FRONT(SEQ)) == 152 END
|
||||
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_FRONT(SEQ, 3)) == 34152 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_PUSH_BACK(SEQ, 3)) == 41523 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, 3)) == 415 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, 3, 3)) == 4153 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, 1, 2)) == 15 END
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_SUBSEQ(SEQ, 2, 2)) == 52 END
|
||||
|
||||
# define F2(r, x) + BOOST_PP_SEQ_ELEM(0, x) + 2 - BOOST_PP_SEQ_ELEM(1, x)
|
||||
|
||||
#define ADD_NIL(x) x(nil)
|
||||
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH_PRODUCT(F2, ((1)(0)) ((2)(3))) == 0 END
|
||||
|
||||
# define L1 (0)(x)
|
||||
# define L2 (a)(1)(b)(2)
|
||||
# define L3 (c)(3)(d)
|
||||
|
||||
# define LL (L1)(L2)(L3)
|
||||
|
||||
#define SEQ_APPEND(s, state, elem) state elem
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 0x0a1b2c3d END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~), LL))) == 9 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ), 2) == 5 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(0,BOOST_PP_SEQ_ENUM(SEQ)) == 4 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2,BOOST_PP_SEQ_ELEM(0,BOOST_PP_VARIADIC_SEQ_TO_SEQ(SEQVAR))) == 8 END
|
||||
|
||||
#endif
|
17
test/slot.c
17
test/slot.c
@ -9,19 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/slot.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define X() 4
|
||||
|
||||
# define BOOST_PP_VALUE 1 + 2 + 3 + X()
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
# undef X
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 10 END
|
||||
|
||||
# define BOOST_PP_VALUE BOOST_PP_SLOT(1) * BOOST_PP_SLOT(1)
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 100 END
|
||||
# include <libs/preprocessor/test/slot.cxx>
|
||||
|
@ -9,19 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/slot.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define X() 4
|
||||
|
||||
# define BOOST_PP_VALUE 1 + 2 + 3 + X()
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
# undef X
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 10 END
|
||||
|
||||
# define BOOST_PP_VALUE BOOST_PP_SLOT(1) * BOOST_PP_SLOT(1)
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 100 END
|
||||
# include <libs/preprocessor/test/slot.cxx>
|
||||
|
53
test/slot.cxx
Normal file
53
test/slot.cxx
Normal file
@ -0,0 +1,53 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/slot.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <boost/preprocessor/slot/counter.hpp>
|
||||
|
||||
# define X() 4
|
||||
|
||||
# define BOOST_PP_VALUE 1 + 2 + 3 + X()
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
# undef X
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 10 END
|
||||
|
||||
# define BOOST_PP_VALUE BOOST_PP_SLOT(1) * BOOST_PP_SLOT(1)
|
||||
# include BOOST_PP_ASSIGN_SLOT(1)
|
||||
|
||||
BEGIN BOOST_PP_SLOT(1) == 100 END
|
||||
|
||||
BEGIN BOOST_PP_COUNTER == 0 END
|
||||
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
|
||||
BEGIN BOOST_PP_COUNTER == 1 END
|
||||
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
|
||||
BEGIN BOOST_PP_COUNTER == 3 END
|
||||
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
|
||||
BEGIN BOOST_PP_COUNTER == 6 END
|
||||
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
#include BOOST_PP_UPDATE_COUNTER()
|
||||
|
||||
BEGIN BOOST_PP_COUNTER == 11 END
|
92
test/tuple.c
92
test/tuple.c
@ -11,94 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TUPLE (0, 1, 2, 3, 4, 5)
|
||||
# define TUPLE_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
|
||||
# define TUPLE_VERY_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)
|
||||
# define T2 (+3, /2, +6)
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(0, x) BOOST_PP_TUPLE_ELEM(1, x) BOOST_PP_TUPLE_ELEM(2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT()(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#else
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT(2)(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 63, TUPLE_VERY_LARGE) == 63 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 2, BOOST_PP_TUPLE_REVERSE(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, BOOST_PP_TUPLE_REVERSE(33,TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 43, BOOST_PP_TUPLE_REVERSE(64,TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(T2) == 7 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END
|
||||
BEGIN TEST_EAT == 4 END
|
||||
BEGIN TEST_EAT_LARGE == 6 END
|
||||
BEGIN TEST_EAT_VERY_LARGE == 8 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(33,TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(64,TUPLE_VERY_LARGE)) == 61 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(6,TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(33,TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(64,TUPLE_VERY_LARGE), 62) == 62 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(6,TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(33,TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(64,TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(63, TUPLE_VERY_LARGE) == 63 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_TUPLE_REVERSE(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(43, BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(T2)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(27,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(45,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE))) == 18 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE) == 6 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_VERY_LARGE)) == 61 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_VERY_LARGE), 62) == 62 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#endif
|
||||
# include <libs/preprocessor/test/tuple.cxx>
|
||||
|
@ -11,94 +11,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TUPLE (0, 1, 2, 3, 4, 5)
|
||||
# define TUPLE_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
|
||||
# define TUPLE_VERY_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)
|
||||
# define T2 (+3, /2, +6)
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(0, x) BOOST_PP_TUPLE_ELEM(1, x) BOOST_PP_TUPLE_ELEM(2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT()(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#else
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT(2)(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 63, TUPLE_VERY_LARGE) == 63 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 2, BOOST_PP_TUPLE_REVERSE(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, BOOST_PP_TUPLE_REVERSE(33,TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 43, BOOST_PP_TUPLE_REVERSE(64,TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(T2) == 7 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END
|
||||
BEGIN TEST_EAT == 4 END
|
||||
BEGIN TEST_EAT_LARGE == 6 END
|
||||
BEGIN TEST_EAT_VERY_LARGE == 8 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(33,TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(64,TUPLE_VERY_LARGE)) == 61 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(6,TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(33,TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(64,TUPLE_VERY_LARGE), 62) == 62 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(6,TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(33,TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(64,TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(63, TUPLE_VERY_LARGE) == 63 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_TUPLE_REVERSE(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(43, BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(T2)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(27,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(45,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE))) == 18 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE) == 6 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_VERY_LARGE)) == 61 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_VERY_LARGE), 62) == 62 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#endif
|
||||
# include <libs/preprocessor/test/tuple.cxx>
|
||||
|
222
test/tuple.cxx
Normal file
222
test/tuple.cxx
Normal file
@ -0,0 +1,222 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define TUPLE (0, 1, 2, 3, 4, 5)
|
||||
# define TUPLE_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
|
||||
# define TUPLE_VERY_LARGE (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)
|
||||
# define T2 (+3, /2, +6)
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(0, x) BOOST_PP_TUPLE_ELEM(1, x) BOOST_PP_TUPLE_ELEM(2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT()(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#else
|
||||
|
||||
# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x)
|
||||
# define TEST_EAT BOOST_PP_TUPLE_EAT(2)(1, 2) 4
|
||||
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) 6
|
||||
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) 8
|
||||
|
||||
#endif
|
||||
|
||||
// elem
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 63, TUPLE_VERY_LARGE) == 63 END
|
||||
|
||||
// reverse
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(6, 2, BOOST_PP_TUPLE_REVERSE(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, 27, BOOST_PP_TUPLE_REVERSE(33,TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(64, 43, BOOST_PP_TUPLE_REVERSE(64,TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(T2) == 7 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(3, T2)) == 6 END
|
||||
|
||||
// eat
|
||||
|
||||
BEGIN TEST_EAT == 4 END
|
||||
BEGIN TEST_EAT_LARGE == 6 END
|
||||
BEGIN TEST_EAT_VERY_LARGE == 8 END
|
||||
|
||||
// to_array
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(6,TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(33,TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(64,TUPLE_VERY_LARGE)) == 61 END
|
||||
|
||||
// to_list
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(6,TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(33,TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(64,TUPLE_VERY_LARGE), 62) == 62 END
|
||||
|
||||
// to_seq
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(6,TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(33,TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(64,TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
// elem
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(3, TUPLE) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(5, TUPLE) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(15, TUPLE_LARGE) == 15 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, TUPLE_LARGE) == 27 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(32, TUPLE_LARGE) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(22, TUPLE_VERY_LARGE) == 22 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(47, TUPLE_VERY_LARGE) == 47 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(63, TUPLE_VERY_LARGE) == 63 END
|
||||
|
||||
// reverse
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_TUPLE_REVERSE(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27, BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(43, BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE)) == 20 END
|
||||
BEGIN CALC(BOOST_PP_TUPLE_REVERSE(T2)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE))) == 3 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(27,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_LARGE))) == 5 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(45,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE_VERY_LARGE))) == 18 END
|
||||
|
||||
// enum
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
||||
|
||||
// insert
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(0, BOOST_PP_TUPLE_INSERT(TUPLE,2,40)) == 0 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_TUPLE_INSERT(TUPLE,1,40)) == 40 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_TUPLE_INSERT(TUPLE,1,40)) == 1 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_INSERT(TUPLE,1,40)) == 7 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(8, BOOST_PP_TUPLE_INSERT(TUPLE_LARGE,22,1000)) == 8 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(22, BOOST_PP_TUPLE_INSERT(TUPLE_LARGE,22,1000)) == 1000 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(26, BOOST_PP_TUPLE_INSERT(TUPLE_LARGE,22,1000)) == 25 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_INSERT(TUPLE_LARGE,22,1000)) == 34 END
|
||||
|
||||
// pop_back
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_BACK(TUPLE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_BACK(TUPLE_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_BACK(TUPLE_VERY_LARGE)) == 63 END
|
||||
|
||||
// pop_front
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_FRONT(TUPLE)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_FRONT(TUPLE_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_POP_FRONT(TUPLE_VERY_LARGE)) == 63 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_TUPLE_POP_FRONT(TUPLE)) == 2 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(31, BOOST_PP_TUPLE_POP_FRONT(TUPLE_LARGE)) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(55, BOOST_PP_TUPLE_POP_FRONT(TUPLE_VERY_LARGE)) == 56 END
|
||||
|
||||
// push_back
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_PUSH_BACK(TUPLE, 6)) == 7 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_PUSH_BACK(TUPLE_LARGE, 33)) == 34 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(0, BOOST_PP_TUPLE_PUSH_BACK(TUPLE, 6)) == 0 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, BOOST_PP_TUPLE_PUSH_BACK(TUPLE_LARGE, 33)) == 33 END
|
||||
|
||||
// push_front
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_PUSH_FRONT(TUPLE, 555)) == 7 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_PUSH_FRONT(TUPLE_LARGE, 666)) == 34 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(0, BOOST_PP_TUPLE_PUSH_FRONT(TUPLE, 555)) == 555 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(33, BOOST_PP_TUPLE_PUSH_FRONT(TUPLE_LARGE, 33)) == 32 END
|
||||
|
||||
// rem
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER == 1400
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(6)(0, 1, 2, 3, 4, 5)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||
|
||||
#else
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||
|
||||
#endif
|
||||
|
||||
// rem_ctor
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE)) == 6 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_VERY_LARGE)) == 64 END
|
||||
|
||||
// remove
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_REMOVE(TUPLE, 1)) == 5 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_REMOVE(TUPLE_LARGE, 17)) == 32 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_REMOVE(TUPLE_VERY_LARGE, 27)) == 63 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(0, BOOST_PP_TUPLE_REMOVE(TUPLE, 2)) == 0 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(29, BOOST_PP_TUPLE_REMOVE(TUPLE_LARGE, 25)) == 30 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(62, BOOST_PP_TUPLE_REMOVE(TUPLE_VERY_LARGE, 48)) == 63 END
|
||||
|
||||
// replace
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_REPLACE(TUPLE_VERY_LARGE, 27, 1000)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(0, BOOST_PP_TUPLE_REPLACE(TUPLE, 1, 44)) == 0 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(29, BOOST_PP_TUPLE_REPLACE(TUPLE_LARGE, 29, 999)) == 999 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(38, BOOST_PP_TUPLE_REPLACE(TUPLE_VERY_LARGE, 37, 1)) == 38 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(28, BOOST_PP_TUPLE_REPLACE(TUPLE_VERY_LARGE, 28, 1)) == 1 END
|
||||
|
||||
// size
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE) == 6 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(TUPLE_VERY_LARGE) == 64 END
|
||||
|
||||
// to_array
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3,BOOST_PP_TUPLE_TO_ARRAY(TUPLE)) == 3 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(29,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_LARGE)) == 29 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(61,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_VERY_LARGE)) == 61 END
|
||||
|
||||
// to_tuple
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE), 2) == 2 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_LARGE), 19) == 19 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_VERY_LARGE), 62) == 62 END
|
||||
|
||||
// to_seq
|
||||
|
||||
BEGIN BOOST_PP_SEQ_ELEM(4,BOOST_PP_TUPLE_TO_SEQ(TUPLE)) == 4 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(31,BOOST_PP_TUPLE_TO_SEQ(TUPLE_LARGE)) == 31 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(55,BOOST_PP_TUPLE_TO_SEQ(TUPLE_VERY_LARGE)) == 55 END
|
||||
|
||||
#endif
|
@ -9,48 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/variadic.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/list/size.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#define VDATA 0,1,2,3,4,5,6
|
||||
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(57,VDATA_VERY_LARGE) == 57 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(35, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) == 35 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA) == 7 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(7,11,3,8,14,85,56,92,165) == 9 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(30,BOOST_PP_VARIADIC_TO_ARRAY(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 30 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(VDATA),3) == 3 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63),49) == 49 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(7,11,3,8,14,85,56,92,165)) == 9 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(VDATA_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(5,BOOST_PP_VARIADIC_TO_SEQ(VDATA)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(16,BOOST_PP_VARIADIC_TO_SEQ(VDATA_LARGE)) == 16 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(3,78,22,11,3)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(8,BOOST_PP_VARIADIC_TO_TUPLE(7,11,3,8,14,85,56,92,165)) == 165 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27,BOOST_PP_VARIADIC_TO_TUPLE(VDATA_LARGE)) == 27 END
|
||||
|
||||
#endif
|
||||
# include <libs/preprocessor/test/variadic.cxx>
|
||||
|
@ -9,48 +9,4 @@
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/variadic.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/list/size.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#define VDATA 0,1,2,3,4,5,6
|
||||
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(57,VDATA_VERY_LARGE) == 57 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(35, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) == 35 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA) == 7 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(7,11,3,8,14,85,56,92,165) == 9 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(30,BOOST_PP_VARIADIC_TO_ARRAY(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 30 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(VDATA),3) == 3 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63),49) == 49 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(7,11,3,8,14,85,56,92,165)) == 9 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(VDATA_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(5,BOOST_PP_VARIADIC_TO_SEQ(VDATA)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(16,BOOST_PP_VARIADIC_TO_SEQ(VDATA_LARGE)) == 16 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(3,78,22,11,3)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(8,BOOST_PP_VARIADIC_TO_TUPLE(7,11,3,8,14,85,56,92,165)) == 165 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27,BOOST_PP_VARIADIC_TO_TUPLE(VDATA_LARGE)) == 27 END
|
||||
|
||||
#endif
|
||||
# include <libs/preprocessor/test/variadic.cxx>
|
||||
|
56
test/variadic.cxx
Normal file
56
test/variadic.cxx
Normal file
@ -0,0 +1,56 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011.
|
||||
# * 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. */
|
||||
#
|
||||
# include <boost/preprocessor/variadic.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/list/size.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#define VDATA 0,1,2,3,4,5,6
|
||||
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(57,VDATA_VERY_LARGE) == 57 END
|
||||
BEGIN BOOST_PP_VARIADIC_ELEM(35, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) == 35 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA) == 7 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(7,11,3,8,14,85,56,92,165) == 9 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(30,BOOST_PP_VARIADIC_TO_ARRAY(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 30 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(VDATA),3) == 3 END
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_VARIADIC_TO_LIST(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63),49) == 49 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(7,11,3,8,14,85,56,92,165)) == 9 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_VARIADIC_TO_LIST(VDATA_LARGE)) == 33 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(5,BOOST_PP_VARIADIC_TO_SEQ(VDATA)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(16,BOOST_PP_VARIADIC_TO_SEQ(VDATA_LARGE)) == 16 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(3,78,22,11,3)) == 5 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_VARIADIC_TO_SEQ(VDATA_VERY_LARGE)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(VDATA)) == 7 END
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_VARIADIC_TO_TUPLE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(8,BOOST_PP_VARIADIC_TO_TUPLE(7,11,3,8,14,85,56,92,165)) == 165 END
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(27,BOOST_PP_VARIADIC_TO_TUPLE(VDATA_LARGE)) == 27 END
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user