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:
@ -1,37 +1,33 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>arrays.html</title>
|
<title>arrays.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4>Arrays</h4>
|
<h4>Arrays</h4>
|
||||||
<div>
|
<div> An <i>array</i> is a data structure consisting of a two-element <i>tuple</i>.
|
||||||
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 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>.
|
The second element is another <i>tuple</i> of the elements in the <i>array</i>.
|
||||||
For example,
|
For example, </div>
|
||||||
</div>
|
<div class="code"> (<i>3</i>, (<i>a</i>, <i>b</i>, <i>c</i>)) </div>
|
||||||
<div class="code">
|
<div> ...is an <i>array</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
||||||
(<i>3</i>, (<i>a</i>, <i>b</i>, <i>c</i>))
|
<i>c</i>. </div>
|
||||||
</div>
|
<div> The primary strength of <i>arrays</i> is that they store their own
|
||||||
<div>
|
size. Because of this, access to elements does not require the
|
||||||
...is an <i>array</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
size. It only requires that an element exists at a certain index. </div>
|
||||||
</div>
|
<div> This allows macro parameters to be variable in size and allows data
|
||||||
<div>
|
states to change size without the user explicitly keeping track of the
|
||||||
The primary strength of <i>arrays</i> is that they store their own size.
|
size independently.</div>
|
||||||
Because of this, access to elements does not require the size.
|
<div>With variadic macro support a <i>tuple </i>has all of the
|
||||||
It only requires that an element exists at a certain index.
|
functionality as an <i>array</i>, knows its own size, and is easier
|
||||||
</div>
|
syntactically to use. Because of that an <i>array</i> should be used, as
|
||||||
<div>
|
opposed to a <i>tuple</i>, only if your compiler does not support
|
||||||
This allows macro parameters to be variable in size and allows data states to change
|
variadic macros.<br>
|
||||||
size without the user explicitly keeping track of the size independently.
|
<br>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Elements of an <i>array</i> can be extracted with <b>BOOST_PP_ARRAY_ELEM</b>,
|
Elements of an <i>array</i> can be extracted with <b>BOOST_PP_ARRAY_ELEM</b>,
|
||||||
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>, and
|
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>,
|
||||||
an <i>array</i> can be converted to the more primitive <i>tuple</i> data structure
|
and an <i>array</i> can be converted to the more primitive <i>tuple</i>
|
||||||
with <b>BOOST_PP_ARRAY_DATA</b>.
|
data structure with <b>BOOST_PP_ARRAY_DATA</b>. </div>
|
||||||
</div>
|
|
||||||
<h4>Primitives</h4>
|
<h4>Primitives</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../ref/array_data.html">BOOST_PP_ARRAY_DATA</a></li>
|
<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>
|
<li><a href="../ref/array_size.html">BOOST_PP_ARRAY_SIZE</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr size="1">
|
<hr size="1">
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
</div>
|
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;">
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
<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
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
copy at <a href=
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,42 +1,35 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>tuples.html</title>
|
<title>tuples.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4>Tuples</h4>
|
<h4>Tuples</h4>
|
||||||
<div>
|
<div> A <i>tuple</i> is a simple comma-separated list of elements inside
|
||||||
A <i>tuple</i> is a simple comma-separated list of elements inside parenthesis.
|
parenthesis. For example, </div>
|
||||||
For example,
|
<div class="code"> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||||
</div>
|
<div> ...is a <i>tuple</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
||||||
<div class="code">
|
<i>c</i>. </div>
|
||||||
(<i>a</i>, <i>b</i>, <i>c</i>)
|
<div> <i>Tuples</i> are fast and easy to use. With variadic macro
|
||||||
</div>
|
support it is not necessary to know the size of a <i>tuple; </i>without
|
||||||
<div>
|
variadic macro support all access to <i>tuples</i> requires
|
||||||
...is a <i>tuple</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
knowledge of its size. Use a <i>tuple </i>instead of an <i>array</i> if
|
||||||
</div>
|
your compiler supports variadic macros, since a <i>tuple </i>has all of
|
||||||
<div>
|
the functionality as an <i>array </i>and is easier syntactically to use.</div>
|
||||||
<i>Tuples</i> are fast and easy to use.
|
<div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>.
|
||||||
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>
|
</div>
|
||||||
<h4>Primitives</h4>
|
<h4>Primitives</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a></li>
|
<li><a href="../ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr size="1">
|
<hr size="1">
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
</div>
|
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;">
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
<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
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
copy at <a href=
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>headers.html</title>
|
<title>headers.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
<base target="desc">
|
<base target="desc">
|
||||||
<style>
|
<style>
|
||||||
.ps { margin-left: 30px; }
|
.ps { margin-left: 30px; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4> Headers <small><a href="contents.html" target="index">[back]</a></small>
|
<h4> Headers <small><a href="contents.html" target="index">[back]</a></small>
|
||||||
</h4>
|
</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>../</li>
|
<li>../</li>
|
||||||
<li class="ps"> <a href="headers/preprocessor.html">preprocessor.hpp</a></li>
|
<li class="ps"> <a href="headers/preprocessor.html">preprocessor.hpp</a></li>
|
||||||
<li><a href="headers/arithmetic.html">arithmetic.hpp</a></li>
|
<li><a href="headers/arithmetic.html">arithmetic.hpp</a></li>
|
||||||
@ -83,7 +84,8 @@
|
|||||||
<li class="ps"><a href="headers/facilities/expand.html">expand.hpp</a></li>
|
<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/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/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/for.html">for.hpp*</a></li>
|
||||||
<li><a href="headers/identity.html">identity.hpp*</a></li>
|
<li><a href="headers/identity.html">identity.hpp*</a></li>
|
||||||
<li><a href="headers/if.html">if.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_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/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/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><a href="headers/slot.html">slot.hpp</a></li>
|
||||||
<li>slot/</li>
|
<li>slot/</li>
|
||||||
<li class="ps"><a href="headers/slot/counter.html">counter.hpp</a></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 class="ps"><a href="headers/slot/slot.html">slot.hpp</a></li>
|
||||||
<li><a href="headers/tuple.html">tuple.hpp</a></li>
|
<li><a href="headers/tuple.html">tuple.hpp</a></li>
|
||||||
<li>tuple/</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/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> (v)</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> (v)</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/rem.html">rem.hpp</a> (v)</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/reverse.html">reverse.hpp</a> (v)</li>
|
<li class="ps"><a href="headers/tuple/pop_back.html">pop_back.hpp</a> <a
|
||||||
<li class="ps"><a href="headers/tuple/size.html">size.hpp</a> (v)</li>
|
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li class="ps"><a href="headers/tuple/to_array.html">to_array.hpp</a> (v)</li>
|
<li class="ps"><a href="headers/tuple/pop_front.html">pop_front.hpp</a> <a
|
||||||
<li class="ps"><a href="headers/tuple/to_list.html">to_list.hpp</a> (v)</li>
|
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li class="ps"><a href="headers/tuple/to_seq.html">to_seq.hpp</a> (v)</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/stringize.html">stringize.hpp</a></li>
|
||||||
<li><a href="headers/variadic.html">variadic.hpp</a></li>
|
<li><a href="headers/variadic.html">variadic.hpp</a></li>
|
||||||
<li>variadic/</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/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> (v)</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> (v)</li>
|
<li class="ps"><a href="headers/variadic/to_array.html">to_array.hpp</a> <a
|
||||||
<li class="ps"><a href="headers/variadic/to_list.html">to_list.hpp</a> (v)</li>
|
href="topics/variadic_macros.html#VNotation">(v)</a></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_list.html">to_list.hpp</a> <a
|
||||||
<li class="ps"><a href="headers/variadic/to_tuple.html">to_tuple.hpp</a> (v)</li>
|
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/while.html">while.hpp*</a></li>
|
||||||
<li><a href="headers/wstringize.html">wstringize.hpp</a></li>
|
<li><a href="headers/wstringize.html">wstringize.hpp</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
<EFBFBD> Copyright Housemarque Oy 2002
|
<EFBFBD> Copyright Housemarque Oy 2002<EFBFBD> Copyright Paul Mensonides 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
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
http://www.boost.org/LICENSE_1_0.txt)-->
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
</body>
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
-->
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,37 +1,59 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>tuple.hpp</title>
|
<title>tuple.hpp</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> The <b>tuple.hpp</b> includes the headers
|
||||||
The <b>tuple.hpp</b> includes the headers in the <i>tuple</i> folder.
|
in the <i>tuple</i> folder. </div>
|
||||||
</div>
|
|
||||||
<h4>Usage</h4>
|
<h4>Usage</h4>
|
||||||
<div class="code">
|
<div class="code"> #include <b><boost/preprocessor/tuple.hpp></b> </div>
|
||||||
#include <b><boost/preprocessor/tuple.hpp></b>
|
<h4>Includes</h4>
|
||||||
</div>
|
|
||||||
<h4>Includes<br></h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="tuple/eat.html"><boost/preprocessor/tuple/eat.hpp></a> (v)</li>
|
<li><a href="tuple/eat.html"><boost/preprocessor/tuple/eat.hpp></a>
|
||||||
<li><a href="tuple/elem.html"><boost/preprocessor/tuple/elem.hpp></a> (v)</li>
|
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||||
<li><a href="tuple/enum.html"><boost/preprocessor/tuple/enum.hpp></a> (v)</li>
|
<li><a href="tuple/elem.html"><boost/preprocessor/tuple/elem.hpp></a>
|
||||||
<li><a href="tuple/rem.html"><boost/preprocessor/tuple/rem.hpp></a> (v)</li>
|
<a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||||
<li><a href="tuple/reverse.html"><boost/preprocessor/tuple/reverse.hpp></a> (v)</li>
|
<li><a href="tuple/enum.html"><boost/preprocessor/tuple/enum.hpp></a>
|
||||||
<li><a href="tuple/size.html"><boost/preprocessor/tuple/size.hpp></a> (v)</li>
|
<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> (v)</li>
|
<li><a href="tuple/insert.html"><boost/preprocessor/tuple/insert.hpp></a>
|
||||||
<li><a href="tuple/to_list.html"><boost/preprocessor/tuple/to_list.hpp></a> (v)</li>
|
<a href="../topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li><a href="tuple/to_seq.html"><boost/preprocessor/tuple/to_seq.hpp></a> (v)</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>
|
</ul>
|
||||||
<hr size="1">
|
<hr size="1">
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
<br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||||
|
</i><i><EFBFBD> Copyright Edward Diener 2013</i><br>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;">
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
<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
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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>
|
106
doc/ref.html
106
doc/ref.html
@ -1,14 +1,15 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>ref.html</title>
|
<title>ref.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
<base target="desc">
|
<base target="desc">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4> Reference <small><a href="contents.html" target="index">[back]</a></small>
|
<h4> Reference <small><a href="contents.html" target="index">[back]</a></small>
|
||||||
</h4>
|
</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<!-- A -->
|
<!-- A -->
|
||||||
<li><a href="ref/add.html">ADD</a></li>
|
<li><a href="ref/add.html">ADD</a></li>
|
||||||
<li><a href="ref/add_d.html">ADD_D</a></li>
|
<li><a href="ref/add_d.html">ADD_D</a></li>
|
||||||
<li><a href="ref/and.html">AND</a></li>
|
<li><a href="ref/and.html">AND</a></li>
|
||||||
@ -36,27 +37,27 @@
|
|||||||
<li><a href="ref/assert.html">ASSERT</a></li>
|
<li><a href="ref/assert.html">ASSERT</a></li>
|
||||||
<li><a href="ref/assert_msg.html">ASSERT_MSG</a></li>
|
<li><a href="ref/assert_msg.html">ASSERT_MSG</a></li>
|
||||||
<li><a href="ref/assign_slot.html">ASSIGN_SLOT</a></li>
|
<li><a href="ref/assign_slot.html">ASSIGN_SLOT</a></li>
|
||||||
<!-- B -->
|
<!-- B -->
|
||||||
<li><a href="ref/bitand.html">BITAND</a></li>
|
<li><a href="ref/bitand.html">BITAND</a></li>
|
||||||
<li><a href="ref/bitnor.html">BITNOR</a></li>
|
<li><a href="ref/bitnor.html">BITNOR</a></li>
|
||||||
<li><a href="ref/bitor.html">BITOR</a></li>
|
<li><a href="ref/bitor.html">BITOR</a></li>
|
||||||
<li><a href="ref/bitxor.html">BITXOR</a></li>
|
<li><a href="ref/bitxor.html">BITXOR</a></li>
|
||||||
<li><a href="ref/bool.html">BOOL</a></li>
|
<li><a href="ref/bool.html">BOOL</a></li>
|
||||||
<!-- C -->
|
<!-- C -->
|
||||||
<li><a href="ref/cat.html">CAT</a></li>
|
<li><a href="ref/cat.html">CAT</a></li>
|
||||||
<li><a href="ref/comma.html">COMMA</a></li>
|
<li><a href="ref/comma.html">COMMA</a></li>
|
||||||
<li><a href="ref/comma_if.html">COMMA_IF</a></li>
|
<li><a href="ref/comma_if.html">COMMA_IF</a></li>
|
||||||
<li><a href="ref/compl.html">COMPL</a></li>
|
<li><a href="ref/compl.html">COMPL</a></li>
|
||||||
<li><a href="ref/config_extended_line_info.html">CONFIG_EXTENDED_LINE_INFO</a></li>
|
<li><a href="ref/config_extended_line_info.html">CONFIG_EXTENDED_LINE_INFO</a></li>
|
||||||
<li><a href="ref/counter.html">COUNTER</a></li>
|
<li><a href="ref/counter.html">COUNTER</a></li>
|
||||||
<!-- D -->
|
<!-- D -->
|
||||||
<li><a href="ref/dec.html">DEC</a></li>
|
<li><a href="ref/dec.html">DEC</a></li>
|
||||||
<li><a href="ref/deduce_d.html">DEDUCE_D</a></li>
|
<li><a href="ref/deduce_d.html">DEDUCE_D</a></li>
|
||||||
<li><a href="ref/deduce_r.html">DEDUCE_R</a></li>
|
<li><a href="ref/deduce_r.html">DEDUCE_R</a></li>
|
||||||
<li><a href="ref/deduce_z.html">DEDUCE_Z</a></li>
|
<li><a href="ref/deduce_z.html">DEDUCE_Z</a></li>
|
||||||
<li><a href="ref/div.html">DIV</a></li>
|
<li><a href="ref/div.html">DIV</a></li>
|
||||||
<li><a href="ref/div_d.html">DIV_D</a></li>
|
<li><a href="ref/div_d.html">DIV_D</a></li>
|
||||||
<!-- E -->
|
<!-- E -->
|
||||||
<li><a href="ref/empty.html">EMPTY</a></li>
|
<li><a href="ref/empty.html">EMPTY</a></li>
|
||||||
<li><a href="ref/enum.html">ENUM</a></li>
|
<li><a href="ref/enum.html">ENUM</a></li>
|
||||||
<li><a href="ref/enum_binary_params.html">ENUM_BINARY_PARAMS</a></li>
|
<li><a href="ref/enum_binary_params.html">ENUM_BINARY_PARAMS</a></li>
|
||||||
@ -83,7 +84,7 @@
|
|||||||
<li><a href="ref/expand.html">EXPAND</a></li>
|
<li><a href="ref/expand.html">EXPAND</a></li>
|
||||||
<li><a href="ref/expr_if.html">EXPR_IF</a></li>
|
<li><a href="ref/expr_if.html">EXPR_IF</a></li>
|
||||||
<li><a href="ref/expr_iif.html">EXPR_IIF</a></li>
|
<li><a href="ref/expr_iif.html">EXPR_IIF</a></li>
|
||||||
<!-- F -->
|
<!-- F -->
|
||||||
<li><a href="ref/filename_x.html">FILENAME_<i>x</i></a></li>
|
<li><a href="ref/filename_x.html">FILENAME_<i>x</i></a></li>
|
||||||
<li><a href="ref/for.html">FOR</a></li>
|
<li><a href="ref/for.html">FOR</a></li>
|
||||||
<li><a href="ref/for_r.html">FOR_<i>r</i></a></li>
|
<li><a href="ref/for_r.html">FOR_<i>r</i></a></li>
|
||||||
@ -91,12 +92,12 @@
|
|||||||
<li><a href="ref/frame_flags.html">FRAME_FLAGS</a></li>
|
<li><a href="ref/frame_flags.html">FRAME_FLAGS</a></li>
|
||||||
<li><a href="ref/frame_iteration.html">FRAME_ITERATION</a></li>
|
<li><a href="ref/frame_iteration.html">FRAME_ITERATION</a></li>
|
||||||
<li><a href="ref/frame_start.html">FRAME_START</a></li>
|
<li><a href="ref/frame_start.html">FRAME_START</a></li>
|
||||||
<!-- G -->
|
<!-- G -->
|
||||||
<li><a href="ref/greater.html">GREATER</a></li>
|
<li><a href="ref/greater.html">GREATER</a></li>
|
||||||
<li><a href="ref/greater_d.html">GREATER_D</a></li>
|
<li><a href="ref/greater_d.html">GREATER_D</a></li>
|
||||||
<li><a href="ref/greater_equal.html">GREATER_EQUAL</a></li>
|
<li><a href="ref/greater_equal.html">GREATER_EQUAL</a></li>
|
||||||
<li><a href="ref/greater_equal_d.html">GREATER_EQUAL_D</a></li>
|
<li><a href="ref/greater_equal_d.html">GREATER_EQUAL_D</a></li>
|
||||||
<!-- I -->
|
<!-- I -->
|
||||||
<li><a href="ref/identity.html">IDENTITY</a></li>
|
<li><a href="ref/identity.html">IDENTITY</a></li>
|
||||||
<li><a href="ref/if.html">IF</a></li>
|
<li><a href="ref/if.html">IF</a></li>
|
||||||
<li><a href="ref/iif.html">IIF</a></li>
|
<li><a href="ref/iif.html">IIF</a></li>
|
||||||
@ -114,7 +115,7 @@
|
|||||||
<li><a href="ref/iteration_limits.html">ITERATION_LIMITS</a></li>
|
<li><a href="ref/iteration_limits.html">ITERATION_LIMITS</a></li>
|
||||||
<li><a href="ref/iteration_params_x.html">ITERATION_PARAMS_<i>x</i></a></li>
|
<li><a href="ref/iteration_params_x.html">ITERATION_PARAMS_<i>x</i></a></li>
|
||||||
<li><a href="ref/iteration_start.html">ITERATION_START</a></li>
|
<li><a href="ref/iteration_start.html">ITERATION_START</a></li>
|
||||||
<!-- L -->
|
<!-- L -->
|
||||||
<li><a href="ref/less.html">LESS</a></li>
|
<li><a href="ref/less.html">LESS</a></li>
|
||||||
<li><a href="ref/less_d.html">LESS_D</a></li>
|
<li><a href="ref/less_d.html">LESS_D</a></li>
|
||||||
<li><a href="ref/less_equal.html">LESS_EQUAL</a></li>
|
<li><a href="ref/less_equal.html">LESS_EQUAL</a></li>
|
||||||
@ -185,7 +186,7 @@
|
|||||||
<li><a href="ref/local_macro.html">LOCAL_MACRO</a></li>
|
<li><a href="ref/local_macro.html">LOCAL_MACRO</a></li>
|
||||||
<li><a href="ref/lparen.html">LPAREN</a></li>
|
<li><a href="ref/lparen.html">LPAREN</a></li>
|
||||||
<li><a href="ref/lparen_if.html">LPAREN_IF</a></li>
|
<li><a href="ref/lparen_if.html">LPAREN_IF</a></li>
|
||||||
<!-- M -->
|
<!-- M -->
|
||||||
<li><a href="ref/max.html">MAX</a></li>
|
<li><a href="ref/max.html">MAX</a></li>
|
||||||
<li><a href="ref/max_d.html">MAX_D</a></li>
|
<li><a href="ref/max_d.html">MAX_D</a></li>
|
||||||
<li><a href="ref/min.html">MIN</a></li>
|
<li><a href="ref/min.html">MIN</a></li>
|
||||||
@ -194,16 +195,16 @@
|
|||||||
<li><a href="ref/mod_d.html">MOD_D</a></li>
|
<li><a href="ref/mod_d.html">MOD_D</a></li>
|
||||||
<li><a href="ref/mul.html">MUL</a></li>
|
<li><a href="ref/mul.html">MUL</a></li>
|
||||||
<li><a href="ref/mul_d.html">MUL_D</a></li>
|
<li><a href="ref/mul_d.html">MUL_D</a></li>
|
||||||
<!-- N -->
|
<!-- N -->
|
||||||
<li><a href="ref/nil.html">NIL</a></li>
|
<li><a href="ref/nil.html">NIL</a></li>
|
||||||
<li><a href="ref/nor.html">NOR</a></li>
|
<li><a href="ref/nor.html">NOR</a></li>
|
||||||
<li><a href="ref/not.html">NOT</a></li>
|
<li><a href="ref/not.html">NOT</a></li>
|
||||||
<li><a href="ref/not_equal.html">NOT_EQUAL</a></li>
|
<li><a href="ref/not_equal.html">NOT_EQUAL</a></li>
|
||||||
<li><a href="ref/not_equal_d.html">NOT_EQUAL_D*</a></li>
|
<li><a href="ref/not_equal_d.html">NOT_EQUAL_D*</a></li>
|
||||||
<!-- O -->
|
<!-- O -->
|
||||||
<li><a href="ref/or.html">OR</a></li>
|
<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 -->
|
<!-- R -->
|
||||||
<li><a href="ref/relative_finish.html">RELATIVE_FINISH</a></li>
|
<li><a href="ref/relative_finish.html">RELATIVE_FINISH</a></li>
|
||||||
<li><a href="ref/relative_flags.html">RELATIVE_FLAGS</a></li>
|
<li><a href="ref/relative_flags.html">RELATIVE_FLAGS</a></li>
|
||||||
<li><a href="ref/relative_iteration.html">RELATIVE_ITERATION</a></li>
|
<li><a href="ref/relative_iteration.html">RELATIVE_ITERATION</a></li>
|
||||||
@ -222,7 +223,7 @@
|
|||||||
<li><a href="ref/repeat_z.html">REPEAT_<i>z</i></a></li>
|
<li><a href="ref/repeat_z.html">REPEAT_<i>z</i></a></li>
|
||||||
<li><a href="ref/rparen.html">RPAREN</a></li>
|
<li><a href="ref/rparen.html">RPAREN</a></li>
|
||||||
<li><a href="ref/rparen_if.html">RPAREN_IF</a></li>
|
<li><a href="ref/rparen_if.html">RPAREN_IF</a></li>
|
||||||
<!-- S -->
|
<!-- S -->
|
||||||
<li><a href="ref/seq_cat.html">SEQ_CAT</a></li>
|
<li><a href="ref/seq_cat.html">SEQ_CAT</a></li>
|
||||||
<li><a href="ref/seq_cat_s.html">SEQ_CAT_S</a></li>
|
<li><a href="ref/seq_cat_s.html">SEQ_CAT_S</a></li>
|
||||||
<li><a href="ref/seq_elem.html">SEQ_ELEM</a></li>
|
<li><a href="ref/seq_elem.html">SEQ_ELEM</a></li>
|
||||||
@ -264,41 +265,52 @@
|
|||||||
<li><a href="ref/stringize.html">STRINGIZE</a></li>
|
<li><a href="ref/stringize.html">STRINGIZE</a></li>
|
||||||
<li><a href="ref/sub.html">SUB</a></li>
|
<li><a href="ref/sub.html">SUB</a></li>
|
||||||
<li><a href="ref/sub_d.html">SUB_D</a></li>
|
<li><a href="ref/sub_d.html">SUB_D</a></li>
|
||||||
<!-- T -->
|
<!-- T -->
|
||||||
<li><a href="ref/tuple_eat.html">TUPLE_EAT</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> (v)</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> (v)</li>
|
<li><a href="ref/tuple_enum.html">TUPLE_ENUM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li><a href="ref/tuple_rem.html">TUPLE_REM</a> (v)</li>
|
<li><span style="color: gray;"></span><a href="ref/tuple_insert.html">TUPLE_INSERT</a>
|
||||||
<li><a href="ref/tuple_rem_ctor.html">TUPLE_REM_CTOR</a> (v)</li>
|
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li><a href="ref/tuple_reverse.html">TUPLE_REVERSE</a> (v)</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_size.html">TUPLE_SIZE</a> (v)</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_to_array.html">TUPLE_TO_ARRAY</a> (v)</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_to_list.html">TUPLE_TO_LIST</a> (v)</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_to_seq.html">TUPLE_TO_SEQ</a> (v)</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>
|
||||||
<!-- U -->
|
<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>
|
<li><a href="ref/update_counter.html">UPDATE_COUNTER</a></li>
|
||||||
<!-- V -->
|
<!-- V -->
|
||||||
<li><a href="ref/value.html">VALUE</a></li>
|
<li><a href="ref/value.html">VALUE</a></li>
|
||||||
<li><a href="ref/variadics.html">VARIADICS</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_elem.html">VARIADIC_ELEM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<li><a href="ref/variadic_size.html">VARIADIC_SIZE</a> (v)</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_to_array.html">VARIADIC_TO_ARRAY</a> (v)</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_list.html">VARIADIC_TO_LIST</a> (v)</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_seq.html">VARIADIC_TO_SEQ</a> (v)</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_tuple.html">VARIADIC_TO_TUPLE</a> (v)</li>
|
<li><a href="ref/variadic_to_seq.html">VARIADIC_TO_SEQ</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||||
<!-- W -->
|
<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.html">WHILE</a></li>
|
||||||
<li><a href="ref/while_d.html">WHILE_<i>d</i></a></li>
|
<li><a href="ref/while_d.html">WHILE_<i>d</i></a></li>
|
||||||
<li><a href="ref/wstringize.html">WSTRINGIZE</a></li>
|
<li><a href="ref/wstringize.html">WSTRINGIZE</a></li>
|
||||||
<!-- X -->
|
<!-- X -->
|
||||||
<li><a href="ref/xor.html">XOR</a></li>
|
<li><a href="ref/xor.html">XOR</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
© Copyright Housemarque Oy 2002
|
© Copyright Housemarque Oy 2002© Copyright Paul Mensonides 2002
|
||||||
© Copyright Paul Mensonides 2002
|
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
http://www.boost.org/LICENSE_1_0.txt)-->
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
-->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,59 +1,51 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||||
<title>BOOST_PP_ARRAY_POP_FRONT</title>
|
<title>BOOST_PP_ARRAY_POP_FRONT</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_POP_FRONT</b> macro
|
||||||
The <b>BOOST_PP_ARRAY_POP_FRONT</b> macro pops an element from the end of an <i>array</i>.
|
pops an element from the beginning of an <i>array</i>.</div>
|
||||||
</div>
|
|
||||||
<h4>Usage</h4>
|
<h4>Usage</h4>
|
||||||
<div class="code">
|
<div class="code"> <b>BOOST_PP_ARRAY_POP_FRONT</b>(<i>array</i>) </div>
|
||||||
<b>BOOST_PP_ARRAY_POP_FRONT</b>(<i>array</i>)
|
|
||||||
</div>
|
|
||||||
<h4>Arguments</h4>
|
<h4>Arguments</h4>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>array</dt>
|
<dt>array</dt>
|
||||||
<dd>
|
<dd> The <i>array</i> to pop an element from. </dd>
|
||||||
The <i>array</i> to pop an element from.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
<h4>Remarks</h4>
|
<h4>Remarks</h4>
|
||||||
<div>
|
<div> This macro returns <i>array</i> after removing the first
|
||||||
This macro returns <i>array</i> after removing the first element.
|
element. If <i>array</i> has no elements, the result of applying
|
||||||
If <i>array</i> has no elements, the result of applying this macro is undefined.
|
this macro is undefined. </div>
|
||||||
</div>
|
<div> This macro uses <b>BOOST_PP_REPEAT</b> internally. Therefore,
|
||||||
<div>
|
to use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>,
|
||||||
This macro uses <b>BOOST_PP_REPEAT</b> internally.
|
see <b>BOOST_PP_ARRAY_POP_FRONT_Z</b> </div>
|
||||||
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>
|
<h4>See Also</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="array_pop_front_z.html">BOOST_PP_ARRAY_POP_FRONT_Z</a></li>
|
<li><a href="array_pop_front_z.html">BOOST_PP_ARRAY_POP_FRONT_Z</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Requirements</h4>
|
<h4>Requirements</h4>
|
||||||
<div>
|
<div> <b>Header:</b> <a href="../headers/array/pop_front.html"><boost/preprocessor/array/pop_front.hpp></a>
|
||||||
<b>Header:</b> <a href="../headers/array/pop_front.html"><boost/preprocessor/array/pop_front.hpp></a>
|
|
||||||
</div>
|
</div>
|
||||||
<h4>Sample Code</h4>
|
<h4>Sample Code</h4>
|
||||||
<div><pre>
|
<div>
|
||||||
#include <<a href="../headers/array/pop_front.html">boost/preprocessor/array/pop_front.hpp</a>>
|
<pre>#include <<a href="../headers/array/pop_front.html">boost/preprocessor/array/pop_front.hpp</a>>
|
||||||
|
|
||||||
#define ARRAY (3, (a, b, c))
|
#define ARRAY (3, (a, b, c))
|
||||||
|
|
||||||
<a href="array_pop_front.html">BOOST_PP_ARRAY_POP_FRONT</a>(ARRAY) // expands to (2, (b, c))
|
<a href="array_pop_front.html">BOOST_PP_ARRAY_POP_FRONT</a>(ARRAY) // expands to (2, (b, c))
|
||||||
</pre></div>
|
</pre></div>
|
||||||
<hr size="1">
|
<hr size="1">
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||||
|
</i><i><EFBFBD> Copyright Edward Diener 2013</i><br>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;">
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
<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
|
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
copy at <a href=
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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
|
functionality will still work. If you specify a size in the variadic
|
||||||
version, it will be ignored, but the warning from some compilers will
|
version, it will be ignored, but the warning from some compilers will
|
||||||
not occur.<br>
|
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>
|
</div>
|
||||||
<h4>See Also</h4>
|
<h4>See Also</h4>
|
||||||
<ul>
|
<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>
|
@ -1,22 +1,25 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>title.html</title>
|
<title>title.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4>Introduction</h4>
|
<h4>Introduction</h4>
|
||||||
<div>
|
<div> The Boost Preprocessing library is a library of macros, with support
|
||||||
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>.
|
for preprocessor metaprogramming. The library supports both C++ and C
|
||||||
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.
|
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>
|
</div>
|
||||||
|
<!--
|
||||||
<!--
|
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
|
||||||
<EFBFBD> Copyright Housemarque Oy 2002
|
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
<EFBFBD> Copyright Paul Mensonides 2002
|
http://www.boost.org/LICENSE_1_0.txt)-->
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
</body>
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
-->
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -7,236 +7,250 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4>Variadic Macros</h4>
|
<h4>Variadic Macros</h4>
|
||||||
<div> Variadic macros are supported by a number of compilers.
|
<div> Variadic macros are supported by a number of compilers.
|
||||||
They are
|
They are
|
||||||
macros of the form:
|
macros of the form:
|
||||||
</div>
|
</div>
|
||||||
<div class="code">
|
<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>
|
||||||
<div> The '...' in the parameter list represents the variadic
|
<div> The '...' in the parameter list represents the variadic
|
||||||
data when the macro is invoked and the __VA_ARGS__ in the expansion
|
data when the macro is invoked and the __VA_ARGS__ in the expansion
|
||||||
represents the variadic data in the expansion of the macro. Variadic
|
represents the variadic data in the expansion of the macro. Variadic
|
||||||
data is of the form of 1 or more preprocessor tokens separated by
|
data is of the form of 1 or more preprocessor tokens separated by
|
||||||
commas.<br>
|
commas.<br>
|
||||||
<br>
|
<br>
|
||||||
The '...' must be the last parameter in the macro definition and there
|
The '...' must be the last parameter in the macro definition and there
|
||||||
may be 0 or more non-variadic parameters preceding it.<br>
|
may be 0 or more non-variadic parameters preceding it.<br>
|
||||||
<br>
|
<br>
|
||||||
In the expansion of the macro __VA_ARGS__ may be specified 0 or more
|
In the expansion of the macro __VA_ARGS__ may be specified 0 or more
|
||||||
times to represent the variadic data. The variadic data in the
|
times to represent the variadic data. The variadic data in the
|
||||||
expansion is a comma separated list of preprocessor tokens representing
|
expansion is a comma separated list of preprocessor tokens representing
|
||||||
the variadic data which the invoker of the macro enters as the last
|
the variadic data which the invoker of the macro enters as the last
|
||||||
arguments to the macro.<br>
|
arguments to the macro.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
||||||
<div class="code">
|
<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>
|
</div>
|
||||||
<u> <span style="font-weight: bold;">Preprocessor
|
<u> <span style="font-weight: bold;">Preprocessor
|
||||||
Library Support<br>
|
Library Support<br>
|
||||||
</span></u>
|
</span></u>
|
||||||
<div>The library offers support for variadic macros for those
|
<div>The library offers support for variadic macros for those
|
||||||
compilers
|
compilers
|
||||||
which support the feature. The library can automatically detect whether
|
which support the feature. The library can automatically detect whether
|
||||||
a compiler supports variadic macros and sets the macro
|
a compiler supports variadic macros and sets the macro
|
||||||
BOOST_PP_VARIADICS accordingly to 1 if the compiler supports variadic
|
BOOST_PP_VARIADICS accordingly to 1 if the compiler supports variadic
|
||||||
macros or 0 if the compiler does not support variadic macros.<br>
|
macros or 0 if the compiler does not support variadic macros.<br>
|
||||||
<br>
|
<br>
|
||||||
The end-user can #define BOOST_PP_VARIADICS to 1 or 0 himself in a
|
The end-user can #define BOOST_PP_VARIADICS to 1 or 0 himself in a
|
||||||
translation unit, before including any preprocessor header files, to
|
translation unit, before including any preprocessor header files, to
|
||||||
prevent the library from attempting to detect whether the compiler
|
prevent the library from attempting to detect whether the compiler
|
||||||
supports variadic macros. This has the effect of manually turning on or
|
supports variadic macros. This has the effect of manually turning on or
|
||||||
off variadic macro support in the library. Of course if one manually
|
off variadic macro support in the library. Of course if one manually
|
||||||
turns on variadic macro support in the library, and one's compiler does
|
turns on variadic macro support in the library, and one's compiler does
|
||||||
not support variadic macros, functionality in the library which uses
|
not support variadic macros, functionality in the library which uses
|
||||||
variadic macros will fail with error messages from the compiler.<br>
|
variadic macros will fail with error messages from the compiler.<br>
|
||||||
<br>
|
<br>
|
||||||
When BOOST_PP_VARIADICS is 1, the library offers some extended
|
When BOOST_PP_VARIADICS is 1, the library offers some extended
|
||||||
functionality
|
functionality
|
||||||
by using variadic macros, and also offers extended support for working
|
by using variadic macros, and also offers extended support for working
|
||||||
with variadic data.<br>
|
with variadic data.<br>
|
||||||
<br>
|
<br>
|
||||||
Support for working with variadic
|
Support for working with variadic
|
||||||
data is largely centered on being able to convert variadic data to
|
data is largely centered on being able to convert variadic data to
|
||||||
other library data types, since the
|
other library data types, since the
|
||||||
functionality for working with those Boost preprocessor library data
|
functionality for working with those Boost preprocessor library data
|
||||||
types is much greater than that for working with variadic data directly.<br>
|
types is much greater than that for working with variadic data directly.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Notation For Variadic Macros<br>
|
<a name="VNotation"></a>
|
||||||
</h4>
|
<h4>Notation For Variadic Macros<br>
|
||||||
<div>In the documentation, headers which have variadic macros,
|
</h4>
|
||||||
and
|
<div>In the documentation, headers which have variadic macros,
|
||||||
variadic macros themselves, have a notation of '(v)' appended to them.
|
and
|
||||||
For the variadic macros themselves this signifies that
|
variadic macros themselves, have a notation of '(v)' appended to them.
|
||||||
BOOST_PP_VARIADICS must be 1 for those variadic macros to be usable.
|
For the variadic macros themselves this signifies that
|
||||||
For variadic macros which have a non-variadic equivalent, the
|
BOOST_PP_VARIADICS must be 1 for those variadic macros to be usable.
|
||||||
non-variadic equivalent will be used if BOOST_PP_VARIADICS is set to 0
|
For variadic macros which have a non-variadic equivalent, the
|
||||||
and the non-variadic version of the
|
non-variadic equivalent will be used if BOOST_PP_VARIADICS is set to 0.
|
||||||
macro does not have a '(v)' appended to its name in the documentation.
|
</div>
|
||||||
</div>
|
<h4>Extended Functionality Using Variadic Macros<br>
|
||||||
<h4>Extended Functionality Using Variadic Macros<br>
|
</h4>
|
||||||
</h4>
|
<div>Some macros in the library offer extended
|
||||||
<div>Some macros in the library offer extended
|
functionality through the use of variadic macros.<br>
|
||||||
functionality through the use of variadic macros.<br>
|
<br>
|
||||||
<br>
|
The variadic macro version offers the same functionality
|
||||||
The variadic macro version offers the same functionality
|
as the non-variadic version, but because of the ability of the variadic
|
||||||
as the non-variadic version, but because of the ability of the variadic
|
parameters to encompass a variable number of arguments, it also offers
|
||||||
parameters to encompass a variable number of arguments, it also offers
|
an enhanced syntax using the same macro name.<br>
|
||||||
an enhanced syntax using the same macro name.<br>
|
<br>
|
||||||
<br>
|
The macros in the library which offer this enhanced functionality are
|
||||||
The macros in the library which offer this enhanced functionality are
|
all
|
||||||
all
|
centered on <i>tuple</i> manipulation. With variadic
|
||||||
centered on <i>tuple</i> manipulation. With variadic
|
macros it is
|
||||||
macros it is
|
possible to
|
||||||
possible to
|
manipulate tuples without having to know the size of the tuple. So
|
||||||
manipulate tuples without having to know the size of the tuple. So
|
while the invoker can still specify the size when using tuple macro
|
||||||
while the invoker can still specify the size when using tuple macro
|
functionality, there are variadic versions of each of the tuple macros,
|
||||||
functionality, there are variadic versions of each of the tuple macros,
|
with the exact same name as the non-variadic macro, where the size need
|
||||||
with the exact same name as the non-variadic macro, where the size need
|
not be specified.<br>
|
||||||
not be specified.<br>
|
</div>
|
||||||
</div>
|
<h4>Extended Support For Variadic Data</h4>
|
||||||
<h4>Extended Support For Variadic Data</h4>
|
<div>The library offers extended support for working with
|
||||||
<div>The library offers extended support for working with
|
variadic data
|
||||||
variadic data
|
which goes beyond the functionality offered by the C++ specification
|
||||||
which goes beyond the functionality offered by the C++ specification
|
for variadic macros. It does this through preprocessor programming and
|
||||||
for variadic macros. It does this through preprocessor programming and
|
by using some of the other functionality in the library itself. Header
|
||||||
by using some of the other functionality in the library itself. Header
|
and macro names
|
||||||
and macro names
|
in the library which offer extended support for working with variadic
|
||||||
in the library which offer extended support for working with variadic
|
data, and need the compiler to support variadic macros, are marked with
|
||||||
data, and need the compiler to support variadic macros, are marked with
|
a (v)<sup> </sup>to indicate a variadic macro.<br>
|
||||||
a (v)<sup> </sup>to indicate a variadic macro.<br>
|
<br>
|
||||||
<br>
|
The form of the functionality which the library offers is centered on
|
||||||
The form of the functionality which the library offers is centered on
|
two macros which work with variadic data itself, and a set of macros
|
||||||
two macros which work with variadic data itself, and a set of macros
|
which convert between variadic data and other library data
|
||||||
which convert between variadic data and other library data
|
types.<br>
|
||||||
types.<br>
|
<br>
|
||||||
<br>
|
The two macros are BOOST_PP_VARIADIC_ELEM and BOOST_PP_VARIADIC_SIZE,
|
||||||
The two macros are BOOST_PP_VARIADIC_ELEM and BOOST_PP_VARIADIC_SIZE,
|
which respectively return a particular token of variadic data and the
|
||||||
which respectively return a particular token of variadic data and the
|
number of tokens of variadic data.<br>
|
||||||
number of tokens of variadic data.<br>
|
<br>
|
||||||
<br>
|
The macros for converting variadic data to the library's data types are
|
||||||
The macros for converting variadic data to the library's data types are
|
BOOST_PP_VARIADIC_TO_ARRAY, BOOST_PP_VARIADIC_TO_LIST,
|
||||||
BOOST_PP_VARIADIC_TO_ARRAY, BOOST_PP_VARIADIC_TO_LIST,
|
BOOST_PP_VARIADIC_TO_SEQ, and BOOST_PP_VARIADIC_TO_TUPLE.<br>
|
||||||
BOOST_PP_VARIADIC_TO_SEQ, and BOOST_PP_VARIADIC_TO_TUPLE.<br>
|
<br>
|
||||||
<br>
|
All of these macros need compiler support for variadic data and only
|
||||||
All of these macros need compiler support for variadic data and only
|
exist if BOOST_PP_VARIADICS is 1. <br>
|
||||||
exist if BOOST_PP_VARIADICS is 1. <br>
|
<br>
|
||||||
<br>
|
The remaining four macros, which convert from a library data type
|
||||||
The remaining four macros, which convert from a library data type
|
to comma-separated preprocessor tokens, which is the form of
|
||||||
to comma-separated preprocessor tokens, which is the form of
|
variadic data, do not need compiler support for variadic
|
||||||
variadic data, do not need compiler support for variadic
|
macros. These functions are BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM,
|
||||||
macros. These functions are BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM,
|
BOOST_PP_SEQ_ENUM, and BOOST_PP_TUPLE_ENUM. However if one wishes to
|
||||||
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
|
||||||
use this variadic data reliably as arguments to other macros, one needs
|
variadic macro support.<br>
|
||||||
variadic macro support.<br>
|
</div>
|
||||||
</div>
|
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
||||||
<u style="font-weight: bold;"> Using Variadic Data</u>
|
</u>
|
||||||
<div>Variadic data exists in the
|
<div>An array as a preprocessor data type is a two-element tuple where the
|
||||||
form of comma-separated preprocessor tokens. This is the case whether
|
first element is the array size and the second element is a tuple which
|
||||||
the variadic data comes from the __VA_ARGS__ of a variadic macro, from
|
constitutes the array data. Because a tuple knows its own size when the
|
||||||
the conversion of a library's data type to variadic data, or the
|
compiler supports variadic macros, there is no reason to use the array preprocessor
|
||||||
manual construction of comma-separated preprocessing tokens by the
|
data type as opposed to the tuple preprocessor data type; the tuple data
|
||||||
programmer writing a macro.<br>
|
type now has all of the functionality which the array data type has and is
|
||||||
<br>
|
syntactically easier to use. With variadic macro support, which is now
|
||||||
The easiest way to work with
|
officially part of the latest C++ standard, the preprocessor array data
|
||||||
variadic data internally is to convert it to a library data type.
|
type is essentially obsolete for conforming C++ compilers. Only if your
|
||||||
Library data types, whether an <i>array</i>, <i>list</i>,
|
compiler does not support variadic macros is the preprocessor array data
|
||||||
<i>sequence</i>,
|
type still useful.</div>
|
||||||
or <i>tuple</i>, have a rich set of functionality for
|
<u style="font-weight: bold;">Using Variadic Data</u>
|
||||||
manipulating
|
<div>Variadic data exists in the
|
||||||
data whereas
|
form of comma-separated preprocessor tokens. This is the case whether
|
||||||
variadic data functionality in the library only allows one to access
|
the variadic data comes from the __VA_ARGS__ of a variadic macro, from
|
||||||
the variadic data as a whole or to access a single token of the
|
the conversion of a library's data type to variadic data, or the
|
||||||
variadic data at a time.<br>
|
manual construction of comma-separated preprocessing tokens by the
|
||||||
<br>
|
programmer writing a macro.<br>
|
||||||
The user of the library still may
|
<br>
|
||||||
choose to pass variadic data back into internal macros rather than
|
The easiest way to work with
|
||||||
convert it to other library data types. There is no problem passing
|
variadic data internally is to convert it to a library data type.
|
||||||
variadic data as a whole to variadic macros as the last parameter of
|
Library data types, whether an <i>array</i>, <i>list</i>,
|
||||||
the macro. However: <br>
|
<i>sequence</i>,
|
||||||
<br>
|
or <i>tuple</i>, have a rich set of functionality for
|
||||||
<span style="font-weight: bold;">Attempting to pass
|
manipulating
|
||||||
variadic data as a
|
data whereas
|
||||||
whole directly into a non-variadic macro is not guaranteed to work and
|
variadic data functionality in the library only allows one to access
|
||||||
may fail.<br>
|
the variadic data as a whole or to access a single token of the
|
||||||
</span><br>
|
variadic data at a time.<br>
|
||||||
This occurs because of a preprocessor weakness in a number
|
<br>
|
||||||
of compilers, currently most notably Visual C++. Even passing variadic
|
The user of the library still may
|
||||||
data as arguments to a non-variadic macro, when it is not represented
|
choose to pass variadic data back into internal macros rather than
|
||||||
in
|
convert it to other library data types. There is no problem passing
|
||||||
the form of __VA_ARGS__, may fail with certain compilers.<br>
|
variadic data as a whole to variadic macros as the last parameter of
|
||||||
<br>
|
the macro. However: <br>
|
||||||
What follows are very simple examples, showing how variadic data can be
|
<br>
|
||||||
passed to a non-variadic macro.<br>
|
<span style="font-weight: bold;">Attempting to pass
|
||||||
<br>
|
variadic data as a
|
||||||
First an example of what NOT to do.<br>
|
whole directly into a non-variadic macro is not guaranteed to work and
|
||||||
</div>
|
may fail.<br>
|
||||||
<h4>Example<u> - Passing variadic data as a whole to a
|
</span><br>
|
||||||
non-variadic
|
This occurs because of a preprocessor weakness in a number
|
||||||
macro. DO NOT DO.</u></h4>
|
of compilers, currently most notably Visual C++. Even passing variadic
|
||||||
<div class="code">
|
data as arguments to a non-variadic macro, when it is not represented
|
||||||
<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>
|
in
|
||||||
</div>
|
the form of __VA_ARGS__, may fail with certain compilers.<br>
|
||||||
<div> There are two ways to pass variadic data to a non-variadic
|
<br>
|
||||||
macro.
|
What follows are very simple examples, showing how variadic data can be
|
||||||
The
|
passed to a non-variadic macro.<br>
|
||||||
first of these is to pass the individual tokens of the variadic data
|
<br>
|
||||||
separately to the non-variadic macro using the BOOST_PP_VARIADIC_ELEM
|
First an example of what NOT to do.<br>
|
||||||
macro in the library.<br>
|
</div>
|
||||||
</div>
|
<h4>Example<u> - Passing variadic data as a whole to a
|
||||||
<h4>Example<u> - Passing individual variadic data tokens to
|
non-variadic
|
||||||
a
|
macro. DO NOT DO.</u></h4>
|
||||||
non-variadic macro.<br>
|
<div class="code">
|
||||||
</u></h4>
|
<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
|
||||||
<div class="code">
|
style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
||||||
<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 = MACRO_ARG_2<br> (<br> BOOST_PP_VARIADIC_ELEM(0,VAR_MACRO(2,3)),<br> BOOST_PP_VARIADIC_ELEM(1,VAR_MACRO(2,3))<br> );</pre>
|
</div>
|
||||||
</div>
|
<div> There are two ways to pass variadic data to a non-variadic
|
||||||
<div>The second way is to use a macro in the library called
|
macro.
|
||||||
BOOST_PP_OVERLOAD.
|
The
|
||||||
This macro allows one to "overload" a variadic macro to non-variadic
|
first of these is to pass the individual tokens of the variadic data
|
||||||
macros of different numbers of parameters, using a common prefix.
|
separately to the non-variadic macro using the BOOST_PP_VARIADIC_ELEM
|
||||||
</div>
|
macro in the library.<br>
|
||||||
<h4>Example<u> - Passing variadic data as a whole to
|
</div>
|
||||||
BOOST_PP_OVERLOAD
|
<h4>Example<u> - Passing individual variadic data tokens to
|
||||||
and on to a non-variadic macro.<br>
|
a
|
||||||
</u></h4>
|
non-variadic macro.<br>
|
||||||
<div class="code">
|
</u></h4>
|
||||||
<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 class="code">
|
||||||
</div><br>
|
<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 = MACRO_ARG_2<br> (<br> BOOST_PP_VARIADIC_ELEM(0,VAR_MACRO(2,3)),<br> BOOST_PP_VARIADIC_ELEM(1,VAR_MACRO(2,3))<br> );</pre>
|
||||||
<div>Although these techniques will work when passing variadic
|
</div>
|
||||||
data to
|
<div>The second way is to use a macro in the library called
|
||||||
non-variadic macros, it is much better and less problematical to
|
BOOST_PP_OVERLOAD.
|
||||||
work internally with the existing library data types and to only use
|
This macro allows one to "overload" a variadic macro to non-variadic
|
||||||
variadic
|
macros of different numbers of parameters, using a common prefix.
|
||||||
macros as an interface for end-users when there is a need to have a
|
</div>
|
||||||
macro which takes a
|
<h4>Example<u> - Passing variadic data as a whole to
|
||||||
variable number of parameters.<br>
|
BOOST_PP_OVERLOAD
|
||||||
</div>
|
and on to a non-variadic macro.<br>
|
||||||
<b>See</b> <b>Also</b><br>
|
</u></h4>
|
||||||
<ul>
|
<div class="code">
|
||||||
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
<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>
|
||||||
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
</div>
|
||||||
</li>
|
<br>
|
||||||
<li><a href="../headers/variadic.html">Variadic
|
<div>Although these techniques will work when passing variadic
|
||||||
Macros<br>
|
data to
|
||||||
</a></li>
|
non-variadic macros, it is much better and less problematical to
|
||||||
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
work internally with the existing library data types and to only use
|
||||||
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
variadic
|
||||||
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
macros as an interface for end-users when there is a need to have a
|
||||||
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
macro which takes a
|
||||||
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
variable number of parameters.<br>
|
||||||
</ul>
|
</div>
|
||||||
<hr size="1">
|
<b>See</b> <b>Also</b><br>
|
||||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
<ul>
|
||||||
Edward Diener
|
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
||||||
2011</i> </div>
|
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
||||||
<div style="margin-left: 0px;">
|
</li>
|
||||||
<p><small>Distributed under the Boost Software License,
|
<li><a href="../headers/variadic.html">Variadic
|
||||||
Version 1.0.
|
Macros<br>
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
</a></li>
|
||||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
||||||
</div>
|
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
||||||
|
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
||||||
|
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
||||||
|
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
||||||
|
</ul>
|
||||||
|
<hr size="1">
|
||||||
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
||||||
|
Edward Diener
|
||||||
|
2011,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>
|
</body>
|
||||||
</html>
|
</html>
|
@ -72,16 +72,15 @@
|
|||||||
#
|
#
|
||||||
# if !defined BOOST_PP_VARIADICS
|
# if !defined BOOST_PP_VARIADICS
|
||||||
# /* variadic support explicitly disabled for all untested compilers */
|
# /* variadic support explicitly disabled for all untested compilers */
|
||||||
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __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
|
# define BOOST_PP_VARIADICS 0
|
||||||
|
# /* Clang, all versions */
|
||||||
|
# elif defined __clang__
|
||||||
|
# define BOOST_PP_VARIADICS 1
|
||||||
# /* VC++ (C/C++) */
|
# /* VC++ (C/C++) */
|
||||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
|
# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
|
||||||
# if _MSC_VER >= 1400
|
|
||||||
# define BOOST_PP_VARIADICS 1
|
# define BOOST_PP_VARIADICS 1
|
||||||
# define BOOST_PP_VARIADICS_MSVC 1
|
# define BOOST_PP_VARIADICS_MSVC 1
|
||||||
# else
|
|
||||||
# define BOOST_PP_VARIADICS 0
|
|
||||||
# endif
|
|
||||||
# /* Wave (C/C++), GCC (C++) */
|
# /* Wave (C/C++), GCC (C++) */
|
||||||
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||||
# define BOOST_PP_VARIADICS 1
|
# define BOOST_PP_VARIADICS 1
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# */
|
# */
|
||||||
#
|
#
|
||||||
# /* Revised by Paul Mensonides (2002) */
|
# /* 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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
@ -18,7 +18,14 @@
|
|||||||
# include <boost/preprocessor/tuple/eat.hpp>
|
# include <boost/preprocessor/tuple/eat.hpp>
|
||||||
# include <boost/preprocessor/tuple/elem.hpp>
|
# include <boost/preprocessor/tuple/elem.hpp>
|
||||||
# include <boost/preprocessor/tuple/enum.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/rem.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/remove.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/replace.hpp>
|
||||||
# include <boost/preprocessor/tuple/reverse.hpp>
|
# include <boost/preprocessor/tuple/reverse.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/tuple/to_array.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 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 *
|
# * Distributed under the Boost Software License, Version 1.0. (See *
|
||||||
# * accompanying file LICENSE_1_0.txt or copy at *
|
# * accompanying file LICENSE_1_0.txt or copy at *
|
||||||
# * http://www.boost.org/LICENSE_1_0.txt) *
|
# * http://www.boost.org/LICENSE_1_0.txt) *
|
||||||
@ -27,7 +27,10 @@
|
|||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_REM */
|
# /* 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
|
# define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM
|
||||||
# else
|
# else
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
# 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/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_REVERSE */
|
# /* 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(...) 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_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_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
|
# else
|
||||||
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
# 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
|
# 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)
|
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
# /* 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(...) 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_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_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||||
|
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
|
# 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)
|
# 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)
|
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY(size, tuple) (size, tuple)
|
# define BOOST_PP_TUPLE_TO_ARRAY(size, tuple) (size, tuple)
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_LIST */
|
# /* 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(...) 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_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_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
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
# 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
|
# 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)
|
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_SEQ */
|
# /* 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(...) 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_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_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
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
# 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
|
# 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)
|
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||||
|
@ -9,54 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic.hpp>
|
# include <libs/preprocessor/test/arithmetic.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,54 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic.hpp>
|
# include <libs/preprocessor/test/arithmetic.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/array.hpp>
|
# include <libs/preprocessor/test/array.cxx>
|
||||||
# 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
|
|
||||||
|
@ -11,83 +11,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/array.hpp>
|
# include <libs/preprocessor/test/array.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/comparison.hpp>
|
# include <libs/preprocessor/test/comparison.cxx>
|
||||||
# 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,37 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/comparison.hpp>
|
# include <libs/preprocessor/test/comparison.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/control.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,32 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/control.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/debug.hpp>
|
# include <libs/preprocessor/test/debug.cxx>
|
||||||
# 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,13 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/debug.hpp>
|
# include <libs/preprocessor/test/debug.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <libs/preprocessor/test/facilities.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,20 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <libs/preprocessor/test/facilities.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/list.cxx>
|
||||||
# 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
|
|
||||||
|
@ -11,51 +11,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/list.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/logical.hpp>
|
# include <libs/preprocessor/test/logical.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,28 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/logical.hpp>
|
# include <libs/preprocessor/test/logical.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/selection.hpp>
|
# include <libs/preprocessor/test/selection.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,13 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/selection.hpp>
|
# include <libs/preprocessor/test/selection.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/seq.cxx>
|
||||||
# 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
|
|
||||||
|
78
test/seq.cpp
78
test/seq.cpp
@ -11,80 +11,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <libs/preprocessor/test/seq.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/slot.hpp>
|
# include <libs/preprocessor/test/slot.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,19 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/slot.hpp>
|
# include <libs/preprocessor/test/slot.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/tuple.hpp>
|
# include <libs/preprocessor/test/tuple.cxx>
|
||||||
# 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
|
|
||||||
|
@ -11,94 +11,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/tuple.hpp>
|
# include <libs/preprocessor/test/tuple.cxx>
|
||||||
# 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
|
|
||||||
|
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. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/variadic.hpp>
|
# include <libs/preprocessor/test/variadic.cxx>
|
||||||
# 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
|
|
||||||
|
@ -9,48 +9,4 @@
|
|||||||
#
|
#
|
||||||
# /* See http://www.boost.org for most recent version. */
|
# /* See http://www.boost.org for most recent version. */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/variadic.hpp>
|
# include <libs/preprocessor/test/variadic.cxx>
|
||||||
# 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
|
|
||||||
|
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