forked from boostorg/preprocessor
Revert "Merge branch 'master' into develop"
This reverts commit1422fce0db
, reversing changes made to9d2d1fffdf
.
This commit is contained in:
@ -138,10 +138,8 @@
|
||||
<li>punctuation/</li>
|
||||
<li class="ps"><a href="headers/punctuation/comma.html">comma.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/comma_if.html">comma_if.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/is_begin_parens.html">is_begin_parens.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/paren.html">paren.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/paren_if.html">paren_if.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/remove_parens.html">remove_parens.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/repeat.html">repeat.hpp*</a></li>
|
||||
<li><a href="headers/repeat_2nd.html">repeat_2nd.hpp*</a></li>
|
||||
<li><a href="headers/repeat_3rd.html">repeat_3rd.hpp*</a></li>
|
||||
|
@ -1,26 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>punctuation/is_begin_parens.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>punctuation/is_begin_parens.hpp</b>
|
||||
header defines a macro that determines if variadic data begins with a
|
||||
parenthesis.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/punctuation/is_begin_parens.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/is_begin_parens.html">BOOST_PP_IS_BEGIN_PARENS</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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,26 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>punctuation/remove_parens.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>punctuation/remove_parens.hpp</b>
|
||||
header defines a macro that removes the beginning parenthesis from its
|
||||
input if it exists.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/punctuation/remove_parens.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/remove_parens.html">BOOST_PP_REMOVE_PARENS</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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>
|
@ -105,7 +105,6 @@
|
||||
<li><a href="ref/include_self.html">INCLUDE_SELF</a></li>
|
||||
<li><a href="ref/indirect_self.html">INDIRECT_SELF</a></li>
|
||||
<li><a href="ref/intercept.html">INTERCEPT</a></li>
|
||||
<li><a href="ref/is_begin_parens.html">IS_BEGIN_PARENS</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/is_iterating.html">IS_ITERATING</a></li>
|
||||
<li><a href="ref/is_selfish.html">IS_SELFISH</a></li>
|
||||
<li><a href="ref/iterate.html">ITERATE</a></li>
|
||||
@ -210,7 +209,6 @@
|
||||
<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_start.html">RELATIVE_START</a></li>
|
||||
<li><a href="ref/remove_parens.html">REMOVE_PARENS</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/repeat.html">REPEAT</a></li>
|
||||
<li><a href="ref/repeat_1st.html">REPEAT_1ST*</a></li>
|
||||
<li><a href="ref/repeat_2nd.html">REPEAT_2ND*</a></li>
|
||||
|
@ -1,41 +1,33 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_LIST</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_LIST</b> macro
|
||||
converts an <i>array</i> to a <i>list</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_LIST</b>(<i>array</i>) </div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
</ul>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>list</i> is empty, as
|
||||
represented by 'BOOST_PP_NIL'.</p>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_list.html"><boost/preprocessor/array/to_list.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_list.html">boost/preprocessor/array/to_list.hpp</a>><br><br><a
|
||||
href="array_to_list.html">BOOST_PP_ARRAY_TO_LIST</a>((3, (x, y, z)))<br> // expands to (x, (y, (z, <a
|
||||
href="nil.html">BOOST_PP_NIL</a>)))</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2011</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>
|
||||
s
|
||||
</body>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_LIST</b>
|
||||
macro converts an <i>array</i> to a <i>list</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_LIST</b>(<i>array</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl><dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<a href="limit_tuple.html"></a><ul>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_list.html"><boost/preprocessor/array/to_list.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_list.html">boost/preprocessor/array/to_list.hpp</a>><br><br><a href="array_to_list.html">BOOST_PP_ARRAY_TO_LIST</a>((3, (x, y, z)))<br> // expands to (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</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,37 +1,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_SEQ</b> macro
|
||||
converts an <i>array</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_SEQ</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>seq</i> is undefined since a
|
||||
<i>seq</i> cannot be empty.</p>
|
||||
<h4>Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_seq.html"><boost/preprocessor/array/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_seq.html">boost/preprocessor/array/to_seq.hpp</a>><br><br><a
|
||||
href="array_to_seq.html">BOOST_PP_ARRAY_TO_SEQ</a>((3, (a, b, c))) // expands to (a)(b)(c)</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2011</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>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_SEQ</b> macro
|
||||
converts an <i>array</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_SEQ</b>(<i>array</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl><dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_seq.html"><boost/preprocessor/array/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_seq.html">boost/preprocessor/array/to_seq.hpp</a>><br><br><a href="array_to_seq.html">BOOST_PP_ARRAY_TO_SEQ</a>((3, (a, b, c))) // expands to (a)(b)(c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</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,39 +1,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_TUPLE</b> macro
|
||||
converts an <i>array</i> to an <i>tuple</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_TUPLE</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_TUPLE</b> macro
|
||||
converts an <i>array</i> to an <i>tuple</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_TUPLE</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>tuple</i> is undefined
|
||||
since a <i>tuple</i> cannot be empty.</p>
|
||||
<h4>Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_tuple.html"><boost/preprocessor/array/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_tuple.html">boost/preprocessor/array/to_tuple.hpp</a>><br><br>#define ARRAY (3,(a, b, c))<br><br><a
|
||||
|
||||
href="array_to_tuple.html">BOOST_PP_ARRAY_TO_TUPLE</a>(ARRAY) // expands to (a, b, c)</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</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>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_tuple.html"><boost/preprocessor/array/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_tuple.html">boost/preprocessor/array/to_tuple.hpp</a>><br><br>#define ARRAY (3,(a, b, c))<br><br><a href="array_to_tuple.html">BOOST_PP_ARRAY_TO_TUPLE</a>(ARRAY) // expands to (a, b, c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</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,68 +1,75 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_FOR_r</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_FOR_<i>r</i></b> macro
|
||||
represents a reentry into the <b>BOOST_PP_FOR</b> repetition construct. </div>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_FOR_<i>r</i></b> macro represents a reentry into the <b>BOOST_PP_FOR</b> repetition construct.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_FOR_</b> ## <i>r</i>(<i>state</i>, <i>pred</i>,
|
||||
<i>op</i>, <i>macro</i>) </div>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_FOR_</b> ## <i>r</i>(<i>state</i>, <i>pred</i>, <i>op</i>, <i>macro</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>r</dt>
|
||||
<dd> The next available <b>BOOST_PP_FOR</b> repetition. </dd>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_FOR</b> repetition.
|
||||
</dd>
|
||||
<dt>state</dt>
|
||||
<dd> The initial state. </dd>
|
||||
<dd>
|
||||
The initial state.
|
||||
</dd>
|
||||
<dt>pred</dt>
|
||||
<dd> A binary predicate of the form <i>pred</i>(<i>r</i>, <i>state</i>).
|
||||
<dd>
|
||||
A binary predicate of the form <i>pred</i>(<i>r</i>, <i>state</i>).
|
||||
This macro must expand to an integer in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
|
||||
<b>BOOST_PP_FOR</b> repeatedly expands <i>macro</i> while this
|
||||
predicate returns non-zero. This macro is called with the next
|
||||
available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
|
||||
<b>BOOST_PP_FOR</b> repeatedly expands <i>macro</i> while this predicate returns non-zero.
|
||||
This macro is called with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
|
||||
</dd>
|
||||
<dt>op</dt>
|
||||
<dd> A binary operation of the form <i>op</i>(<i>r</i>, <i>state</i>).
|
||||
This operation is expanded by <b>BOOST_PP_FOR</b> with the next
|
||||
available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
|
||||
This macro is repeatedly applied to the <i>state</i>, each time
|
||||
producing a new <i>state</i>, until <i>pred</i> returns <i>0</i>. </dd>
|
||||
<dd>
|
||||
A binary operation of the form <i>op</i>(<i>r</i>, <i>state</i>).
|
||||
This operation is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
|
||||
This macro is repeatedly applied to the <i>state</i>, each time producing a new <i>state</i>, until <i>pred</i> returns <i>0</i>.
|
||||
</dd>
|
||||
<dt>macro</dt>
|
||||
<dd> A binary macro of the form <i>macro</i>(<i>r</i>, <i>state</i>).
|
||||
This macro is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b>
|
||||
repetition and the current <i>state</i>. This macro is is
|
||||
repeated by <b>BOOST_PP_FOR</b> until <i>pred</i> returns <i>0</i>. </dd>
|
||||
<dd>
|
||||
A binary macro of the form <i>macro</i>(<i>r</i>, <i>state</i>).
|
||||
This macro is expanded by <b>BOOST_PP_FOR</b> with the next available <b>BOOST_PP_FOR</b> repetition and the current <i>state</i>.
|
||||
This macro is is repeated by <b>BOOST_PP_FOR</b> until <i>pred</i> returns <i>0</i>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro expands to the sequence:
|
||||
<div> <i>macro</i>(<i>r</i>, <i>state</i>) <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>,
|
||||
<i>state</i>)) ... <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, ... <i>op</i>(<i>r</i>,
|
||||
<i>state</i>) ... )) </div>
|
||||
<div>
|
||||
This macro expands to the sequence:
|
||||
<div>
|
||||
<i>macro</i>(<i>r</i>, <i>state</i>) <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, <i>state</i>)) ... <i>macro</i>(<i>r</i>, <i>op</i>(<i>r</i>, ... <i>op</i>(<i>r</i>, <i>state</i>) ... ))
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.
|
||||
This happens when the <i>r</i> value is a macro invocation itself.
|
||||
It needs a delay to allow it to expand.
|
||||
The syntax in such a scenario becomes:
|
||||
<div>
|
||||
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_FOR_</b>, <i>r</i>)(<i>state</i>, <i>pred</i>, <i>op</i>, <i>macro</i>)
|
||||
</div>
|
||||
<div> At certain times, it may be necessary to perform the concatenation
|
||||
with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting
|
||||
operator. This happens when the <i>r</i> value is a macro
|
||||
invocation itself. It needs a delay to allow it to expand. The
|
||||
syntax in such a scenario becomes:
|
||||
<div> <b>BOOST_PP_CAT</b>(<b>BOOST_PP_FOR_</b>, <i>r</i>)(<i>state</i>,
|
||||
<i>pred</i>, <i>op</i>, <i>macro</i>) </div>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="cat.html">BOOST_PP_CAT</a></li>
|
||||
<li><a href="for.html">BOOST_PP_FOR</a></li>
|
||||
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
|
||||
<li><a href="for_r_macros.html"><span style="color: gray;">Macros with R
|
||||
re-entrancy forms</span></a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/repetition/for.html"><boost/preprocessor/repetition/for.hpp></a>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/repetition/for.html"><boost/preprocessor/repetition/for.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/arithmetic/dec.html">boost/preprocessor/arithmetic/dec.hpp</a>>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/arithmetic/dec.html">boost/preprocessor/arithmetic/dec.hpp</a>>
|
||||
#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>>
|
||||
#include <<a href="../headers/comparison/not_equal.html">boost/preprocessor/comparison/not_equal.hpp</a>>
|
||||
#include <<a href="../headers/punctuation/comma_if.html">boost/preprocessor/punctuation/comma_if.hpp</a>>
|
||||
@ -134,16 +141,15 @@ TEMPLATE_TEMPLATE(2, 4, T)
|
||||
*/
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,44 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_FOR_r_macros</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>This is a list, based on functionality, of the macros which have an
|
||||
alternate <b>_<i>r</i></b> name, representing a reentry into the <b>BOOST_PP_FOR</b>
|
||||
looping construct:
|
||||
<p>repetition</p>
|
||||
<ul>
|
||||
<li><a href="deduce_r.html">BOOST_PP_DEDUCE_R</a></li>
|
||||
</ul>
|
||||
list<br>
|
||||
<ul>
|
||||
<li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
|
||||
<li><a href="list_for_each_i_r.html">BOOST_PP_LIST_FOR_EACH_I_R</a></li>
|
||||
<li><a href="list_for_each_product_r.html">BOOST_PP_LIST_FOR_EACH_PRODUCT_R</a></li>
|
||||
<li><a href="list_for_each_r.html">BOOST_PP_LIST_FOR_EACH_R</a></li>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ_R</a></li>
|
||||
<li><a href="list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R</a></li>
|
||||
</ul>
|
||||
seq<br>
|
||||
<ul>
|
||||
<li><a href="seq_for_each_product_r.html">BOOST_PP_SEQ_FOR_EACH_PRODUCT_R</a></li>
|
||||
<li><a href="seq_for_each_r.html">BOOST_PP_SEQ_FOR_EACH_R</a></li>
|
||||
</ul>
|
||||
base<br>
|
||||
<ul>
|
||||
<li><a href="for_r.html">BOOST_PP_FOR_R</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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,47 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_IS_BEGIN_PARENS</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_IS_BEGIN_PAREN</b>S
|
||||
determines whether the input starts with a set of parenthesis.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_IS_BEGIN_PARENS</b>(...) <a href="../topics/variadic_macros.html#VNotation"
|
||||
target="_self"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<h4> ... <span style="font-weight: normal;">
|
||||
The input as variadic data.</span></h4>
|
||||
<h4>Remarks</h4>
|
||||
<div> If the input input begins with a parenthesis, with any data within
|
||||
that parenthesis, the macro returns 1, otherwise it returns 0. Data may
|
||||
follow the beginning parenthesis and the macro still will return 1.<br>
|
||||
<br>
|
||||
For Visual Studio 2005 ( VC8 ) the input data must be a single parameter
|
||||
else a compilation error will occur.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="remove_parens.html">BOOST_PP_REMOVE_PARENS</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/punctuation/is_begin_parens.html"><boost/preprocessor/punctuation/is_begin_parens.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/punctuation/is_begin_parens.html">boost/preprocessor/punctuation/is_begin_parens.hpp</a>>
|
||||
|
||||
#define VARDATA more_data , more_params<br>#define VARDATAP ( data ) more_data , more_params<br>#define DATA data<br>#define DATAP ( data ) more_data<br>
|
||||
BOOST_PP_IS_BEGIN_PARENS(VARDATA) // expands to 0, compiler error with VC8
|
||||
BOOST_PP_IS_BEGIN_PARENS(VARDATAP) // expands to 1, compiler error with VC8<br><br>BOOST_PP_IS_BEGIN_PARENS(DATA) // expands to 0
|
||||
BOOST_PP_IS_BEGIN_PARENS(DATAP) // expands to 1<br><br>BOOST_PP_IS_BEGIN_PARENS() // expands to 0<br>
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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,47 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_ARRAY</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. <br>
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_WHILE</b>. Within <b>BOOST_PP_WHILE</b>,
|
||||
it is more efficient to use <b>BOOST_PP_LIST_TO_ARRAY_D</b>.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by
|
||||
'BOOST_PP_NIL', the resulting <i>array</i> is empty, as represented by '( 0, ()
|
||||
)'.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_array.html">boost/preprocessor/list/to_array.hpp</a>><br><br>#define LIST (a, (b, (c, <a
|
||||
|
||||
href="nil.html">BOOST_PP_NIL</a>)))<br><br><a href="list_to_array.html">BOOST_PP_LIST_TO_ARRAY</a>(LIST) // expands to (3, (a, b, c))</pre>
|
||||
This macro uses <b>BOOST_PP_WHILE</b>.
|
||||
Within <b>BOOST_PP_WHILE</b>, it is more efficient to use <b>BOOST_PP_LIST_TO_ARRAY_D</b>.
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</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>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_array.html">boost/preprocessor/list/to_array.hpp</a>><br><br>#define LIST (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))<br><br><a href="list_to_array.html">BOOST_PP_LIST_TO_ARRAY</a>(LIST) // expands to (3, (a, b, c))<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</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,34 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_ARRAY_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY_D</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. It reenters <b>BOOST_PP_WHILE</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY_D</b>(<i>d</i>, <i>list</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_ARRAY_D</b> macro converts a <i>list</i> to an <i>array</i>.
|
||||
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY_D</b>(<i>d</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_WHILE</b> iteration.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>list</i> to be converted is empty, as
|
||||
represented by 'BOOST_PP_NIL', the resulting <i>array</i> is empty, as
|
||||
represented by '( 0, () )'. </p>
|
||||
<h4>See Also</h4>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,44 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ</b>(<i>list</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl><dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_FOR</b>. Within <b>BOOST_PP_FOR</b>, it
|
||||
is more efficient to use <b>BOOST_PP_LIST_TO_SEQ_R</b>.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by
|
||||
'BOOST_PP_NIL', the resulting <i>seq</i> is undefined since a <i>seq</i>
|
||||
cannot be empty.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ_R</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_seq.html">boost/preprocessor/list/to_seq.hpp</a>><br><br><a
|
||||
href="list_to_seq.html">BOOST_PP_LIST_TO_SEQ</a>((a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))) // expands to (a)(b)(c)</pre>
|
||||
This macro uses <b>BOOST_PP_FOR</b>.
|
||||
Within <b>BOOST_PP_FOR</b>, it is more efficient to use <b>BOOST_PP_LIST_TO_SEQ_R</b>.
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2011</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>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ_R</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_seq.html">boost/preprocessor/list/to_seq.hpp</a>><br><br><a href="list_to_seq.html">BOOST_PP_LIST_TO_SEQ</a>((a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))) // expands to (a)(b)(c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</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,32 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_SEQ_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ_R</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. It reenters <b>BOOST_PP_FOR</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ_R</b>(<i>r</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_SEQ_R</b> macro converts a <i>list</i> to an <i>seq</i>.
|
||||
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ_R</b>(<i>r</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_FOR</b> repetition.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>list</i> to be converted is empty, as
|
||||
represented by 'BOOST_PP_NIL', the resulting <i>seq</i> is undefined
|
||||
since a <i>seq</i> cannot be empty.</p>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,55 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_TUPLE</b> macro
|
||||
converts a <i>list</i> to a <i>tuple</i>. </div>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_TUPLE</b> macro converts a <i>list</i> to a <i>tuple</i>.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_TUPLE</b>(<i>list</i>) </div>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_LIST_TO_TUPLE</b>(<i>list</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
<dd>
|
||||
The <i>list</i> to be converted.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
<div>
|
||||
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
this macro will produce:
|
||||
<div> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||
<div>
|
||||
(<i>a</i>, <i>b</i>, <i>c</i>)
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
||||
There is no longer any such restriction.
|
||||
It is more efficient, however, to use <b>BOOST_PP_LIST_TO_TUPLE_R</b> in such a situation.
|
||||
</div>
|
||||
<div> Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
||||
There is no longer any such restriction. It is more efficient,
|
||||
however, to use <b>BOOST_PP_LIST_TO_TUPLE_R</b> in such a situation.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by 'BOOST_PP_NIL',
|
||||
the resulting <i>tuple</i> is undefined since a <i>tuple</i> cannot be
|
||||
empty.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
|
||||
#define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))
|
||||
|
||||
<a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a>(LIST) // expands to (w, x, y, z)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,42 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_TUPLE_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_TUPLE_R</b> macro
|
||||
converts a <i>list</i> to a <i>tuple</i>. It reenters <b>BOOST_PP_FOR</b>
|
||||
with maximum efficiency. </div>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_TUPLE_R</b> macro converts a <i>list</i> to a <i>tuple</i>.
|
||||
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_TUPLE_R</b>(<i>r</i>, <i>list</i>)
|
||||
<div class="code">
|
||||
<b>BOOST_PP_LIST_TO_TUPLE_R</b>(<i>r</i>, <i>list</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>r</dt>
|
||||
<dd> The next available <b>BOOST_PP_FOR</b> repetition. </dd>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_FOR</b> repetition.
|
||||
</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
<dd>
|
||||
The <i>list</i> to be converted.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>,
|
||||
<b>BOOST_PP_NIL</b>))), this macro will produce: </p>
|
||||
<div>
|
||||
<div> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
this macro will produce:
|
||||
<div>
|
||||
(<i>a</i>, <i>b</i>, <i>c</i>)
|
||||
</div>
|
||||
</div>
|
||||
<h4><span style="font-weight: normal;"> If the <i>list</i> to
|
||||
be converted is empty, as represented by 'BOOST_PP_NIL', the resulting <i>tuple</i>
|
||||
is undefined since a <i>tuple</i> cannot be empty. </span></h4>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>>
|
||||
#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
#include <<a href="../headers/repetition/for.html">boost/preprocessor/repetition/for.hpp</a>>
|
||||
|
||||
@ -50,13 +55,15 @@
|
||||
// expands to (x, y, z) (y, z) (z)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,44 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_REMOVE_PARENS</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_REMOVE_PAREN</b>S macro
|
||||
removes the beginning parenthesis, if it exists, from the input data and
|
||||
expands to the result</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_REMOVE_PARENS</b>(param) <a href="../topics/variadic_macros.html#VNotation"
|
||||
target="_self"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments <span style="font-weight: normal;"></span></h4>
|
||||
<h4><span style="font-weight: normal;"> param</span>
|
||||
<span style="font-weight: normal;">
|
||||
The input data.</span></h4>
|
||||
<h4>Remarks</h4>
|
||||
<div> If the input begins with a parenthesis, with any data within that
|
||||
parenthesis, the macro removes the parenthesis and expands to the result.
|
||||
If the input does not begin with a parenthesis the macro expands to the
|
||||
input.<br>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="is_begin_parens.html">BOOST_PP_IS_BEGIN_PARENS</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/punctuation/remove_parens.html"><boost/preprocessor/punctuation/remove_parens.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/punctuation/remove_parens.html">boost/preprocessor/punctuation/remove_parens.hpp</a>><br><br>#define DATA data<br>#define DATAP ( data ) more_data<br><br>BOOST_PP_REMOVE_PARENS(DATA) // expands to 'data'
|
||||
BOOST_PP_REMOVE_PARENS(DATAP) // expands to 'data more_data'<br>
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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,59 +1,67 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_REPEAT_z</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_REPEAT_<i>z</i></b> macro
|
||||
represents a reentry into the <b>BOOST_PP_REPEAT</b> repetition
|
||||
construct. </div>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_REPEAT_<i>z</i></b> macro represents a reentry into the <b>BOOST_PP_REPEAT</b> repetition construct.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_REPEAT_</b> ## <i>z</i>(<i>count</i>, <i>macro</i>,
|
||||
<i>data</i>) </div>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_REPEAT_</b> ## <i>z</i>(<i>count</i>, <i>macro</i>, <i>data</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>z</dt>
|
||||
<dd> The next available <b>BOOST_PP_REPEAT</b> dimension. </dd>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_REPEAT</b> dimension.
|
||||
</dd>
|
||||
<dt>count</dt>
|
||||
<dd> The number of repetitious calls to <i>macro</i>. Valid values
|
||||
range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>. </dd>
|
||||
<dd>
|
||||
The number of repetitious calls to <i>macro</i>.
|
||||
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
|
||||
</dd>
|
||||
<dt>macro</dt>
|
||||
<dd> A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).
|
||||
This macro is expanded by <b>BOOST_PP_REPEAT</b> with the next
|
||||
available repetition depth, the current repetition number, and the
|
||||
auxiliary <i>data</i> argument. </dd>
|
||||
<dd>
|
||||
A ternary operation of the form <i>macro</i>(<i>z</i>, <i>n</i>, <i>data</i>).
|
||||
This macro is expanded by <b>BOOST_PP_REPEAT</b> with the next available repetition depth,
|
||||
the current repetition number, and the auxiliary <i>data</i> argument.
|
||||
</dd>
|
||||
<dt>data</dt>
|
||||
<dd> Auxiliary data passed to <i>macro</i>. </dd>
|
||||
<dd>
|
||||
Auxiliary data passed to <i>macro</i>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro expands to the sequence:
|
||||
<div> <i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>) <i>macro</i>(<i>z</i>,
|
||||
<i>1</i>, <i>data</i>) ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>,
|
||||
<i>data</i>) </div>
|
||||
<div>
|
||||
This macro expands to the sequence:
|
||||
<div>
|
||||
<i>macro</i>(<i>z</i>, <i>0</i>, <i>data</i>) <i>macro</i>(<i>z</i>, <i>1</i>, <i>data</i>) ... <i>macro</i>(<i>z</i>, <i>count</i> - <i>1</i>, <i>data</i>)
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.
|
||||
This happens when the <i>z</i> value is a macro invocation itself.
|
||||
It needs a delay to allow it to expand.
|
||||
The syntax in such a scenario becomes:
|
||||
<div>
|
||||
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_REPEAT_</b>, <i>z</i>)(<i>count</i>, <i>macro</i>, <i>data</i>)
|
||||
</div>
|
||||
<div> At certain times, it may be necessary to perform the concatenation
|
||||
with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting
|
||||
operator. This happens when the <i>z</i> value is a macro
|
||||
invocation itself. It needs a delay to allow it to expand. The
|
||||
syntax in such a scenario becomes:
|
||||
<div> <b>BOOST_PP_CAT</b>(<b>BOOST_PP_REPEAT_</b>, <i>z</i>)(<i>count</i>,
|
||||
<i>macro</i>, <i>data</i>) </div>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="cat.html">BOOST_PP_CAT</a></li>
|
||||
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
|
||||
<li><a href="repeat.html">BOOST_PP_REPEAT</a></li>
|
||||
<li><a href="repeat_z_macros.html"><span style="color: gray;">Macros with
|
||||
Z re-entrancy forms</span></a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/repetition/repeat.html"><boost/preprocessor/repetition/repeat.hpp></a>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/repetition/repeat.html"><boost/preprocessor/repetition/repeat.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>>
|
||||
#include <<a href="../headers/punctuation/comma_if.html">boost/preprocessor/punctuation/comma_if.hpp</a>>
|
||||
#include <<a href="../headers/repetition/repeat.html">boost/preprocessor/repetition/repeat.hpp</a>>
|
||||
|
||||
@ -78,16 +86,15 @@
|
||||
*/
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,45 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_REPEAT_z_macros</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>This is a list, based on functionality, of the macros which have an
|
||||
alternate <b>_z<i></i></b> name, representing a reentry into the <b>BOOST_PP_REPEAT</b>
|
||||
looping construct:<br>
|
||||
<br>
|
||||
array<br>
|
||||
<ul>
|
||||
<li><a href="array_pop_back_z.html">BOOST_PP_ARRAY_POP_BACK_Z</a></li>
|
||||
<li><a href="array_pop_front_z.html">BOOST_PP_ARRAY_POP_FRONT_Z</a></li>
|
||||
</ul>
|
||||
repetition<br>
|
||||
<ul>
|
||||
<li><a href="deduce_z.html">BOOST_PP_DEDUCE_Z</a></li>
|
||||
<li><a href="enum_binary_params_z.html">BOOST_PP_ENUM_BINARY_PARAMS_Z</a></li>
|
||||
<li><a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a></li>
|
||||
<li><a href="esbpz.html">BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</a></li>
|
||||
<li><a href="enum_shifted_params_z.html">BOOST_PP_ENUM_SHIFTED_PARAMS_Z</a></li>
|
||||
<li><a href="enum_shifted_z.html">BOOST_PP_ENUM_SHIFTED_<i>z</i></a></li>
|
||||
<li><a href="etbpz.html">BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z</a></li>
|
||||
<li><a href="enum_trailing_params_z.html">BOOST_PP_ENUM_TRAILING_PARAMS_Z</a></li>
|
||||
<li><a href="enum_trailing_z.html">BOOST_PP_ENUM_TRAILING_<i>z</i></a></li>
|
||||
<li><a href="enum_z.html">BOOST_PP_ENUM_<i>z</i></a></li>
|
||||
<li><a href="repeat_from_to_d_z.html">BOOST_PP_REPEAT_FROM_TO_D_<i>z</i></a></li>
|
||||
<li><a href="repeat_from_to_z.html">BOOST_PP_REPEAT_FROM_TO_<i>z</i></a></li>
|
||||
</ul>
|
||||
base<br>
|
||||
<ul>
|
||||
<li><a href="repeat_z.html">BOOST_PP_REPEAT_<i>z</i></a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<pre></pre>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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>
|
@ -11,7 +11,7 @@
|
||||
Usage
|
||||
</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_SEQ_REPLACE</b>(<i>seq</i>, <i>i</i>, <i>elem</i>)
|
||||
<b>BOOST_PP_SEQ_RPLACE</b>(<i>seq</i>, <i>i</i>, <i>elem</i>)
|
||||
</div>
|
||||
<h4>
|
||||
Arguments
|
||||
|
@ -1,66 +1,78 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<head>
|
||||
<title>BOOST_PP_WHILE_d</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_WHILE_<i>d</i></b> macro
|
||||
represents a reentry into the <b>BOOST_PP_WHILE</b> looping construct. </div>
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_WHILE_<i>d</i></b> macro represents a reentry into the <b>BOOST_PP_WHILE</b> looping construct.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_WHILE_</b> ## <i>d</i>(<i>pred</i>, <i>op</i>,
|
||||
<i>state</i>) </div>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_WHILE_</b> ## <i>d</i>(<i>pred</i>, <i>op</i>, <i>state</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd> The next available <b>BOOST_PP_WHILE</b> iteration. </dd>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_WHILE</b> iteration.
|
||||
</dd>
|
||||
<dt>pred</dt>
|
||||
<dd> A binary predicate of the form <i>pred</i>(<i>d</i>, <i>state</i>).
|
||||
This predicate is expanded by <b>BOOST_PP_WHILE</b> with the next
|
||||
available iteration <i>d</i> and the current <i>state</i>. This
|
||||
predicate must expand to value in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
|
||||
<dd>
|
||||
A binary predicate of the form <i>pred</i>(<i>d</i>, <i>state</i>).
|
||||
This predicate is expanded by <b>BOOST_PP_WHILE</b> with the next available
|
||||
iteration <i>d</i> and the current <i>state</i>.
|
||||
This predicate must expand to value in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
|
||||
The construct continues to loop until this predicate returns <i>0</i>.
|
||||
When this predicate returns <i>0</i>, <b>BOOST_PP_WHILE</b> returns
|
||||
the current <i>state</i>. </dd>
|
||||
When this predicate returns <i>0</i>, <b>BOOST_PP_WHILE</b> returns the current <i>state</i>.
|
||||
</dd>
|
||||
<dt>op</dt>
|
||||
<dd> A binary operation of the form <i>op</i>(<i>d</i>, <i>state</i>).
|
||||
This operation is expanded by <b>BOOST_PP_WHILE</b> with the next
|
||||
available iteration <i>d</i> and the current <i>state</i>. This
|
||||
macro is repeatedly applied to the <i>state</i>, each time producing a
|
||||
new <i>state</i>, until <i>pred</i> returns <i>0</i>. </dd>
|
||||
<dd>
|
||||
A binary operation of the form <i>op</i>(<i>d</i>, <i>state</i>).
|
||||
This operation is expanded by <b>BOOST_PP_WHILE</b> with the next available
|
||||
iteration <i>d</i> and the current <i>state</i>.
|
||||
This macro is repeatedly applied to the <i>state</i>, each time producing a new <i>state</i>, until <i>pred</i> returns <i>0</i>.
|
||||
</dd>
|
||||
<dt>state</dt>
|
||||
<dd> The initial state. Often this argument is a <i>tuple</i>. </dd>
|
||||
<dd>
|
||||
The initial state.
|
||||
Often this argument is a <i>tuple</i>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro iterates <i>op</i>(<i>d</i>, <i>state</i>) while <i>pred</i>(<i>d</i>,
|
||||
<i>state</i>) is non-zero. In other words expands to:
|
||||
<div> <i>op</i>(<i>d</i>, ... <i>op</i>(<i>d</i>, <i>op</i>(<i>d</i>, <i>state</i>))
|
||||
... ). </div>
|
||||
<div>
|
||||
This macro iterates <i>op</i>(<i>d</i>, <i>state</i>) while <i>pred</i>(<i>d</i>, <i>state</i>) is non-zero.
|
||||
In other words expands to:
|
||||
<div>
|
||||
<i>op</i>(<i>d</i>, ... <i>op</i>(<i>d</i>, <i>op</i>(<i>d</i>, <i>state</i>)) ... ).
|
||||
</div>
|
||||
<div> At certain times, it may be necessary to perform the concatenation
|
||||
with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting
|
||||
operator. This happens when the <i>d</i> value is a macro
|
||||
invocation itself. It needs a delay to allow it to expand. The
|
||||
syntax in such a scenario becomes:
|
||||
<div> <b>BOOST_PP_CAT</b>(<b>BOOST_PP_WHILE_</b>, <i>d</i>)(<i>pred</i>,
|
||||
<i>op</i>, <i>state</i>). </div>
|
||||
</div>
|
||||
<div> Previously, it was possible to concatenate <i>d</i> directly to <b>BOOST_PP_WHILE</b>
|
||||
(without the trailing underscore). This is no longer supported. </div>
|
||||
<div>
|
||||
At certain times, it may be necessary to perform the concatenation with <b>BOOST_PP_CAT</b> rather than the preprocessor token-pasting operator.
|
||||
This happens when the <i>d</i> value is a macro invocation itself.
|
||||
It needs a delay to allow it to expand.
|
||||
The syntax in such a scenario becomes:
|
||||
<div>
|
||||
<b>BOOST_PP_CAT</b>(<b>BOOST_PP_WHILE_</b>, <i>d</i>)(<i>pred</i>, <i>op</i>, <i>state</i>).
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Previously, it was possible to concatenate <i>d</i> directly to <b>BOOST_PP_WHILE</b> (without the trailing underscore).
|
||||
This is no longer supported.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="cat.html">BOOST_PP_CAT</a></li>
|
||||
<li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
|
||||
<li><a href="while.html">BOOST_PP_WHILE</a></li>
|
||||
<li><a href="while_d_macros.html"><span style="color: gray;">Macros with D
|
||||
re-entrancy forms</span></a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/control/while.html"><boost/preprocessor/control/while.hpp></a>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/control/while.html"><boost/preprocessor/control/while.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>>
|
||||
#include <<a href="../headers/arithmetic/dec.html">boost/preprocessor/arithmetic/dec.hpp</a>>
|
||||
#include <<a href="../headers/array/elem.html">boost/preprocessor/array/elem.hpp</a>>
|
||||
#include <<a href="../headers/array/size.html">boost/preprocessor/array/size.hpp</a>>
|
||||
@ -103,16 +115,15 @@
|
||||
ACCUMULATE_D(1, ARRAY)// expands to 10
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,86 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_WHILE_d_macros</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>This is a list, based on functionality, of the macros which have an
|
||||
alternate <b>_<i>d</i></b> name, representing a reentry into the <b>BOOST_PP_WHILE</b>
|
||||
looping construct:<br>
|
||||
<br>
|
||||
arithmetic<br>
|
||||
<ul>
|
||||
<li><a href="add_d.html"><span style="color: gray;">BOOST_PP_ADD_D</span></a></li>
|
||||
<li><a href="div_d.html"><span style=" color: gray;">BOOST_PP_DIV_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/div_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="mod_d.html"><span style=" color: gray;">BOOST_PP_MOD_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/mod_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="mul_d.html"><span
|
||||
style=" color: gray;">BOOST_PP_MUL_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/mul_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="sub_d.html"><span
|
||||
style=" color: gray;">BOOST_PP_SUB_D</span></a></li>
|
||||
</ul>
|
||||
array<br>
|
||||
<ul>
|
||||
<li><a href="array_insert_d.html"><span style="color: gray;">BOOST_PP_ARRAY_INSERT_D</span></a></li>
|
||||
<li><span style=" color: gray;"><a href="array_remove_d.html">BOOST_PP_ARRAY_REMOVE_D</a></span></li>
|
||||
<li><a href="array_replace_d.html"><span style=" color: gray;">BOOST_PP_ARRAY_REPLACE_D</span></a></li>
|
||||
</ul>
|
||||
comparison<br>
|
||||
<ul>
|
||||
<li><a href="greater_d.html"><span style=" color: gray;">BOOST_PP_GREATER_D</span></a></li>
|
||||
<li><a href="greater_equal_d.html"><span style=" color: gray;">BOOST_PP_GREATER_EQUAL_D</span></a></li>
|
||||
<li><a href="less_d.html"><span style=" color: gray;">BOOST_PP_LESS_D</span></a></li>
|
||||
<li><a href="less_equal_d.html"><span style=" color: gray;">BOOST_PP_LESS_EQUAL_D</span></a></li>
|
||||
</ul>
|
||||
control<br>
|
||||
<ul>
|
||||
<li><a href="deduce_d.html"><span style=" color: gray;">BOOST_PP_DEDUCE_D</span></a></li>
|
||||
</ul>
|
||||
list<br>
|
||||
<ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="list_append_d.html"><span style=" color: gray;">BOOST_PP_LIST_APPEND_D</span></a></li>
|
||||
<li><a href="list_at_d.html"><span style=" color: gray;">BOOST_PP_LIST_AT_D</span></a></li>
|
||||
<li><a href="list_cat_d.html"><span style=" color: gray;">BOOST_PP_LIST_CAT_D</span></a></li>
|
||||
<li><a href="list_filter_d.html"><span style=" color: gray;">BOOST_PP_LIST_FILTER_D</span></a></li>
|
||||
<li><a href="list_first_n_d.html"><span style=" color: gray;">BOOST_PP_LIST_FIRST_N_D</span></a></li>
|
||||
<li><a href="list_fold_left_d.html"><span style=" color: gray;">BOOST_PP_LIST_FOLD_LEFT_d</span></a></li>
|
||||
<li><a href="list_fold_right_d.html"><span style=" color: gray;">BOOST_PP_LIST_FOLD_RIGHT_d</span></a></li>
|
||||
<li><a href="list_rest_n_d.html"><span style=" color: gray;">BOOST_PP_LIST_REST_N_D</span></a></li>
|
||||
<li><a href="list_reverse_d.html"><span style=" color: gray;">BOOST_PP_LIST_REVERSE_D</span></a></li>
|
||||
<li><a href="list_to_array_d.html"><span style=" color: gray;">BOOST_PP_LIST_TO_ARRAY_D</span></a></li>
|
||||
<li><a href="list_transform_d.html"><span style=" color: gray;">BOOST_PP_LIST_TRANSFORM_D</span></a></li>
|
||||
</ul>
|
||||
selection<br>
|
||||
<ul>
|
||||
<li><a href="max_d.html"><span style=" color: gray;">BOOST_PP_MAX_D</span></a></li>
|
||||
<li><a href="min_d.html"><span style=" color: gray;">BOOST_PP_MIN_D</span></a></li>
|
||||
</ul>
|
||||
repetition<br>
|
||||
<ul>
|
||||
<li><a href="repeat_from_to_d.html"><span style=" color: gray;">BOOST_PP_REPEAT_FROM_TO_D</span></a></li>
|
||||
<li><a href="repeat_from_to_d_z.html"><span style=" color: gray;">BOOST_PP_REPEAT_FROM_TO_D_z</span></a></li>
|
||||
</ul>
|
||||
tuple<br>
|
||||
<ul>
|
||||
<li><a href="tuple_insert_d.html"><span style=" color: gray;">BOOST_PP_TUPLE_INSERT_D</span></a></li>
|
||||
<li><a href="tuple_remove_d.html"><span style=" color: gray;">BOOST_PP_TUPLE_REMOVE_D</span></a></li>
|
||||
<li><a href="tuple_replace_d.html"><span style=" color: gray;">BOOST_PP_TUPLE_REPLACE_D</span></a></li>
|
||||
</ul>
|
||||
base<br>
|
||||
<ul>
|
||||
<li><a href="while_d.html"><span style=" color: gray;">BOOST_PP_WHILE_D</span></a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</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,50 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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_ARRAY_DETAIL_GET_DATA_HPP
|
||||
# define BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && _MSC_VER > 1400
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_DETAIL_GET_DATA */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_SINGLE(size, data) BOOST_PP_TUPLE_REM_CAT(size) data
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) BOOST_PP_TUPLE_REM(size) data
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_CHECK_ZERO(size, data) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
size, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_SINGLE \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA(size, data) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_1(size), \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_SINGLE, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_CHECK_ZERO \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA(size, data) BOOST_PP_TUPLE_REM(size) data
|
||||
# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && _MSC_VER > 1400 */
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP */
|
@ -1,7 +1,6 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -19,7 +18,6 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_PUSH_BACK */
|
||||
#
|
||||
@ -30,6 +28,6 @@
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_D(array, elem) BOOST_PP_ARRAY_PUSH_BACK_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_I(size, data, elem) (BOOST_PP_INC(size), (BOOST_PP_ARRAY_DETAIL_GET_DATA(size,data) BOOST_PP_COMMA_IF(size) elem))
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_I(size, data, elem) (BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) data BOOST_PP_COMMA_IF(size) elem))
|
||||
#
|
||||
# endif
|
||||
|
@ -1,7 +1,6 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -19,7 +18,6 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_PUSH_FRONT */
|
||||
#
|
||||
@ -30,6 +28,6 @@
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_D(array, elem) BOOST_PP_ARRAY_PUSH_FRONT_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (BOOST_PP_INC(size), (elem BOOST_PP_COMMA_IF(size) BOOST_PP_ARRAY_DETAIL_GET_DATA(size,data)))
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (BOOST_PP_INC(size), (elem BOOST_PP_COMMA_IF(size) BOOST_PP_TUPLE_REM(size) data))
|
||||
#
|
||||
# endif
|
||||
|
@ -15,33 +15,19 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_LIST */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_TO_LIST_DO, \
|
||||
BOOST_PP_ARRAY_TO_LIST_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_LIST_EMPTY(array) BOOST_PP_NIL
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_I(m, args) BOOST_PP_ARRAY_TO_LIST_II(m, args)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_I(array) BOOST_PP_TUPLE_TO_LIST ## array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_TUPLE_TO_LIST array
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_TUPLE_TO_LIST array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -15,32 +15,19 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_seq.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_SEQ */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_TO_SEQ_DO, \
|
||||
BOOST_PP_ARRAY_TO_SEQ_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_EMPTY(array)
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_I(m, args) BOOST_PP_ARRAY_TO_SEQ_II(m, args)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_I(array) BOOST_PP_TUPLE_TO_SEQ ## array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_TUPLE_TO_SEQ array
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_TUPLE_TO_SEQ array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -14,20 +14,9 @@
|
||||
# define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/array/data.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_TUPLE */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_DATA, \
|
||||
BOOST_PP_ARRAY_TO_TUPLE_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE_EMPTY(array)
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE BOOST_PP_ARRAY_DATA
|
||||
#
|
||||
# endif
|
||||
|
@ -1,55 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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_DETAIL_IS_EMPTY_HPP
|
||||
#define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP
|
||||
|
||||
#include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
|
||||
# pragma warning(once:4002)
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t
|
||||
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit)
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) ()
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */
|
@ -14,8 +14,6 @@
|
||||
# ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# /* BOOST_PP_EMPTY */
|
||||
#
|
||||
# define BOOST_PP_EMPTY()
|
||||
|
@ -1,7 +1,6 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2003.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -14,21 +13,17 @@
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# else
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/detail/split.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_IS_EMPTY */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER)
|
||||
# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents()))
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1)
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, 1 BOOST_PP_EMPTY
|
||||
# define BOOST_PP_IS_EMPTY_HELPER() , 0
|
||||
# else
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
@ -45,4 +40,4 @@
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL
|
||||
# endif
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */
|
||||
# endif
|
||||
|
@ -14,7 +14,6 @@
|
||||
#
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
#
|
||||
@ -23,7 +22,7 @@
|
||||
# define BOOST_PP_IS_EMPTY_OR_1(x) \
|
||||
BOOST_PP_IIF( \
|
||||
BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()), \
|
||||
BOOST_PP_IDENTITY(1), \
|
||||
1 BOOST_PP_EMPTY, \
|
||||
BOOST_PP_IS_1 \
|
||||
)(x) \
|
||||
/**/
|
||||
|
@ -1,57 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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_FACILITIES_IS_EMPTY_VARIADIC_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
# include <boost/preprocessor/facilities/detail/is_empty.hpp>
|
||||
#
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
#
|
||||
#define BOOST_PP_IS_EMPTY(param) \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
param \
|
||||
) \
|
||||
) \
|
||||
( \
|
||||
BOOST_PP_IS_EMPTY_ZERO, \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
|
||||
) \
|
||||
(param) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_ZERO(param) 0
|
||||
# else
|
||||
#define BOOST_PP_IS_EMPTY(...) \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
__VA_ARGS__ \
|
||||
) \
|
||||
) \
|
||||
( \
|
||||
BOOST_PP_IS_EMPTY_ZERO, \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
|
||||
) \
|
||||
(__VA_ARGS__) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_ZERO(...) 0
|
||||
# endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
|
||||
# endif /* BOOST_PP_VARIADICS */
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */
|
@ -1,7 +1,6 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2011.
|
||||
# * (C) Copyright Edward Diener 2011,2014.
|
||||
# * (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)
|
||||
@ -20,28 +19,10 @@
|
||||
# include <boost/preprocessor/list/adt.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/array/detail/get_data.hpp>
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO \
|
||||
) \
|
||||
(list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY(list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# endif
|
||||
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_LIST_TO_ARRAY_I(w, list) \
|
||||
@ -133,24 +114,10 @@
|
||||
# endif
|
||||
# define BOOST_PP_LIST_TO_ARRAY_P(d, state) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(3, 0, state))
|
||||
# define BOOST_PP_LIST_TO_ARRAY_O(d, state) BOOST_PP_LIST_TO_ARRAY_O_I state
|
||||
# define BOOST_PP_LIST_TO_ARRAY_O_I(list, size, tuple) (BOOST_PP_LIST_REST(list), BOOST_PP_INC(size), (BOOST_PP_ARRAY_DETAIL_GET_DATA(size,tuple), BOOST_PP_LIST_FIRST(list)))
|
||||
# define BOOST_PP_LIST_TO_ARRAY_O_I(list, size, tuple) (BOOST_PP_LIST_REST(list), BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) tuple, BOOST_PP_LIST_FIRST(list)))
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY_D */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO \
|
||||
) \
|
||||
(d, list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY(d, list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# endif
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_LIST_TO_ARRAY_HPP */
|
||||
|
@ -16,45 +16,22 @@
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/list/enum.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_TUPLE */
|
||||
#
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_TUPLE_EMPTY, \
|
||||
BOOST_PP_LIST_TO_TUPLE_DO \
|
||||
) \
|
||||
(list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_TUPLE_EMPTY(list)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_TO_TUPLE_DO(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_TUPLE_DO(list) BOOST_PP_LIST_TO_TUPLE_I(list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) BOOST_PP_LIST_TO_TUPLE_I(list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_I(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_TUPLE_R */
|
||||
#
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_TUPLE_R_EMPTY, \
|
||||
BOOST_PP_LIST_TO_TUPLE_R_DO \
|
||||
) \
|
||||
(r, list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_EMPTY(r,list)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_DO(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_DO(r, list) BOOST_PP_LIST_TO_TUPLE_R_I(r, list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) BOOST_PP_LIST_TO_TUPLE_R_I(r, list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_I(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# endif
|
||||
#
|
||||
|
@ -14,9 +14,7 @@
|
||||
#
|
||||
# include <boost/preprocessor/punctuation/comma.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren_if.hpp>
|
||||
# include <boost/preprocessor/punctuation/remove_parens.hpp>
|
||||
#
|
||||
# endif
|
||||
|
@ -1,48 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
|
||||
#include <boost/preprocessor/facilities/empty.hpp>
|
||||
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC */
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__)
|
||||
#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1,
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0,
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */
|
@ -1,51 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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_IS_BEGIN_PARENS_HPP
|
||||
# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP
|
||||
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#include <boost/preprocessor/punctuation/detail/is_begin_parens.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(param) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(...) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
|
||||
#endif /* BOOST_PP_VARIADICS */
|
||||
#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */
|
@ -1,39 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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_REMOVE_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_REMOVE_PARENS_HPP
|
||||
|
||||
#include <boost/preprocessor/config/config.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#include <boost/preprocessor/control/iif.hpp>
|
||||
#include <boost/preprocessor/facilities/identity.hpp>
|
||||
#include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
#include <boost/preprocessor/tuple/enum.hpp>
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS(param) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS(param), \
|
||||
BOOST_PP_REMOVE_PARENS_DO, \
|
||||
BOOST_PP_IDENTITY \
|
||||
) \
|
||||
(param)() \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS_DO(param) \
|
||||
BOOST_PP_IDENTITY(BOOST_PP_TUPLE_ENUM(param)) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS */
|
||||
#endif /* BOOST_PREPROCESSOR_REMOVE_PARENS_HPP */
|
@ -16,9 +16,6 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/eat.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# include <boost/preprocessor/variadic/detail/is_single_return.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_SEQ_BINARY_TRANSFORM */
|
||||
#
|
||||
@ -31,15 +28,8 @@
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_BINARY_TRANSFORM_A seq, 0)
|
||||
# endif
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_GET_REM(...) \
|
||||
BOOST_PP_VARIADIC_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,__VA_ARGS__) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_GET_REM(...) BOOST_PP_REM
|
||||
# endif
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_SEQ_BINARY_TRANSFORM_GET_REM(__VA_ARGS__), __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_SEQ_BINARY_TRANSFORM_GET_REM(__VA_ARGS__), __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
# else
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
|
@ -14,17 +14,17 @@
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/seq/detail/split.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_REST_N */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))()
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
|
||||
# else
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))()
|
||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -1,28 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \
|
||||
BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \
|
||||
/**/
|
||||
# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */
|
@ -8,7 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002-2011) */
|
||||
# /* Revised by Edward Diener (2011,2014) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -21,27 +21,15 @@
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# include <boost/preprocessor/tuple/detail/is_single_return.hpp>
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
|
||||
# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
/*
|
||||
Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty )
|
||||
else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM
|
||||
functionality. See tuple_elem_bug_test.cxx.
|
||||
*/
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \
|
||||
BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
|
||||
# define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple)
|
||||
# else
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
|
@ -16,17 +16,10 @@
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# include <boost/preprocessor/tuple/detail/is_single_return.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_REM */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
/* To be used internally when __VA_ARGS__ is a single element */
|
||||
# define BOOST_PP_REM_CAT(...) BOOST_PP_CAT(__VA_ARGS__,)
|
||||
# endif
|
||||
# define BOOST_PP_REM(...) __VA_ARGS__
|
||||
# else
|
||||
# define BOOST_PP_REM(x) x
|
||||
@ -37,11 +30,7 @@
|
||||
/*
|
||||
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)
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
/* To be used internally when the size is 1 */
|
||||
# define BOOST_PP_TUPLE_REM_CAT(size) BOOST_PP_REM_CAT
|
||||
# endif
|
||||
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER == 1400)
|
||||
# define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
@ -125,11 +114,10 @@
|
||||
# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple)
|
||||
# else
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
|
@ -48,9 +48,6 @@
|
||||
# endif
|
||||
# endif
|
||||
#
|
||||
/* An empty array can be passed */
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_0() ()
|
||||
#
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_1(e0) (e0)
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_2(e0, e1) (e0)(e1)
|
||||
# define BOOST_PP_TUPLE_TO_SEQ_3(e0, e1, e2) (e0)(e1)(e2)
|
||||
|
@ -1,28 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
# define BOOST_PREPROCESSOR_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_VARIADIC_IS_SINGLE_RETURN */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_VARIADIC_IS_SINGLE_RETURN(sr,nsr,...) \
|
||||
BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)),sr,nsr) \
|
||||
/**/
|
||||
# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP */
|
@ -19,22 +19,21 @@ project preprocessor_tests : requirements <warnings>on
|
||||
|
||||
test-suite preprocessor
|
||||
:
|
||||
[ compile arithmetic.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile array.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile comparison.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile control.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile debug.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile facilities.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile iteration.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile list.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile logical.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile punctuation.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile repetition.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile selection.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile seq.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile slot.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile tuple.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile variadic.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile arithmetic.cpp ]
|
||||
[ compile array.cpp ]
|
||||
[ compile comparison.cpp ]
|
||||
[ compile control.cpp ]
|
||||
[ compile debug.cpp ]
|
||||
[ compile facilities.cpp ]
|
||||
[ compile iteration.cpp ]
|
||||
[ compile list.cpp ]
|
||||
[ compile logical.cpp ]
|
||||
[ compile repetition.cpp ]
|
||||
[ compile selection.cpp ]
|
||||
[ compile seq.cpp ]
|
||||
[ compile slot.cpp ]
|
||||
[ compile tuple.cpp ]
|
||||
[ compile variadic.cpp ]
|
||||
;
|
||||
|
||||
test-suite preprocessor_nvm
|
||||
@ -89,10 +88,6 @@ test-suite preprocessor_c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: logical_c
|
||||
]
|
||||
[ compile punctuation.c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: punctuation_c
|
||||
]
|
||||
[ compile selection.c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: selection_c
|
||||
@ -178,40 +173,3 @@ test-suite preprocessor_c_nvm
|
||||
: tuple_c_nvm
|
||||
]
|
||||
;
|
||||
|
||||
test-suite preprocessor_isempty
|
||||
:
|
||||
[ compile isempty.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile-fail isempty_variadic_standard_failure.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
[ compile-fail isempty_variadic_standard_failure2.cpp : <toolset>gcc:<cxxflags>-std=c++0x ]
|
||||
;
|
||||
|
||||
test-suite preprocessor_isempty_nvm
|
||||
:
|
||||
[ compile isempty.cpp : <define>BOOST_PP_VARIADICS=0 : isempty_nvm ]
|
||||
;
|
||||
|
||||
test-suite preprocessor_isempty_c
|
||||
:
|
||||
[ compile isempty.c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: isempty_c
|
||||
]
|
||||
[ compile-fail isempty_variadic_standard_failure.c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: isempty_variadic_standard_failure_c
|
||||
]
|
||||
[ compile-fail isempty_variadic_standard_failure2.c
|
||||
: <toolset>gcc:<cflags>-std=c99
|
||||
: isempty_variadic_standard_failure2_c
|
||||
]
|
||||
;
|
||||
|
||||
test-suite preprocessor_isempty_c_nvm
|
||||
:
|
||||
[ compile isempty.c
|
||||
: <define>BOOST_PP_VARIADICS=0
|
||||
<toolset>gcc:<cflags>-std=c99
|
||||
: isempty_c_nvm
|
||||
]
|
||||
;
|
||||
|
@ -13,19 +13,14 @@
|
||||
#
|
||||
# include <boost/preprocessor/array.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <boost/preprocessor/facilities/is_empty.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/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
|
||||
# define ARRAY_EMPTY (0, ())
|
||||
# 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))
|
||||
@ -47,7 +42,6 @@ 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
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(ARRAY_EMPTY) == 0 END
|
||||
|
||||
// enum
|
||||
|
||||
@ -63,7 +57,6 @@ 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
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_EMPTY)) == 1 END
|
||||
|
||||
# endif
|
||||
|
||||
@ -73,7 +66,6 @@ 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
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_ARRAY_TO_LIST(ARRAY_EMPTY)) == 0 END
|
||||
|
||||
// to_seq
|
||||
|
||||
@ -112,9 +104,6 @@ BEGIN BOOST_PP_ARRAY_ELEM(22, BOOST_PP_ARRAY_INSERT(ARRAY_LARGE,22,1000)) == 100
|
||||
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
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_INSERT(ARRAY_EMPTY,0,25)) == 25 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_INSERT(ARRAY_EMPTY,0,1000)) == 1 END
|
||||
|
||||
// pop_back
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_POP_BACK(ARRAY)) == 2 END
|
||||
@ -135,19 +124,15 @@ BEGIN BOOST_PP_ARRAY_ELEM(55, BOOST_PP_ARRAY_POP_FRONT(ARRAY_VERY_LARGE)) == 56
|
||||
|
||||
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_SIZE(BOOST_PP_ARRAY_PUSH_BACK(ARRAY_EMPTY, 10)) == 1 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
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_PUSH_BACK(ARRAY_EMPTY, 136)) == 136 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_SIZE(BOOST_PP_ARRAY_PUSH_FRONT(ARRAY_EMPTY, 10)) == 1 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
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_PUSH_FRONT(ARRAY_EMPTY, 136)) == 136 END
|
||||
|
||||
// remove
|
||||
|
||||
@ -172,4 +157,3 @@ 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
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_EMPTY)) == 0 END
|
||||
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty.cxx>
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty.cxx>
|
145
test/isempty.cxx
145
test/isempty.cxx
@ -1,145 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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/config/config.hpp>
|
||||
#
|
||||
#if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) || (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC())
|
||||
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#define DATA
|
||||
#define OBJECT OBJECT2
|
||||
#define OBJECT2
|
||||
#define FUNC(x) FUNC2(x)
|
||||
#define FUNC2(x)
|
||||
#define FUNC_GEN() ()
|
||||
#define FUNC_GEN2(x) ()
|
||||
#define FUNC_GEN3() (&)
|
||||
#define FUNC_GEN4(x) (y)
|
||||
#define FUNC_GEN5() (y,z)
|
||||
#define FUNC_GEN6() anything
|
||||
#define FUNC_GEN7(x) anything
|
||||
#define FUNC_GEN8(x,y) (1,2,3)
|
||||
#define FUNC_GEN9(x,y,z) anything
|
||||
#define FUNC_GEN10(x) (y) data
|
||||
#define NAME &name
|
||||
#define ATUPLE (atuple)
|
||||
#define ATUPLE_PLUS (atuple) data
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#if defined(BOOST_PP_VARIADICS_MSVC) /* Testing the VC++ variadic version */
|
||||
|
||||
/* INCORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 1 END
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
|
||||
|
||||
#else /* Testing the non-VC++ variadic version */
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 0 END
|
||||
|
||||
/* COMPILER ERROR */
|
||||
|
||||
// BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 0 END
|
||||
// BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
|
||||
|
||||
#endif
|
||||
|
||||
/* Testing the variadic version */
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(DATA BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(OBJECT BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC(z) BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN6) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN7) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 0 END
|
||||
|
||||
#else
|
||||
|
||||
#if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() /* Testing the VC++ non-variadic version */
|
||||
|
||||
/* INCORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 1 END
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
|
||||
|
||||
#else /* Testing the non-VC++ non-variadic version */
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 0 END
|
||||
|
||||
/* UNDEFINED BEHAVIOR */
|
||||
|
||||
// BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 0 END
|
||||
// BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 1 END
|
||||
// BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
|
||||
|
||||
#endif
|
||||
|
||||
/* Testing the non-variadic version */
|
||||
|
||||
/* CORRECT */
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(DATA BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(OBJECT BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC(z) BOOST_PP_EMPTY()) == 1 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN6) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN7) == 0 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty_variadic_standard_failure.cxx>
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty_variadic_standard_failure.cxx>
|
@ -1,25 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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/facilities/is_empty.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !defined(BOOST_PP_VARIADICS_MSVC)
|
||||
|
||||
#define FUNC_GEN8(x,y) (1,2,3)
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 0 END
|
||||
|
||||
#else
|
||||
|
||||
BEGIN 1 == 0 END
|
||||
|
||||
#endif
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty_variadic_standard_failure2.cxx>
|
@ -1,12 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 <libs/preprocessor/test/isempty_variadic_standard_failure2.cxx>
|
@ -1,25 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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/facilities/is_empty.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !defined(BOOST_PP_VARIADICS_MSVC)
|
||||
|
||||
#define FUNC_GEN9(x,y,z) anything
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
|
||||
|
||||
#else
|
||||
|
||||
BEGIN 1 == 0 END
|
||||
|
||||
#endif
|
@ -16,27 +16,17 @@
|
||||
# include <boost/preprocessor/comparison/equal.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
# include <boost/preprocessor/list.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/seq/elem.hpp>
|
||||
# include <boost/preprocessor/seq/size.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)
|
||||
# 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)
|
||||
# define F2(r, x) + BOOST_PP_TUPLE_ELEM(2, 0, x) + 2 - BOOST_PP_TUPLE_ELEM(2, 1, x)
|
||||
# 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_FIRST(LIST) == 4 END
|
||||
BEGIN BOOST_PP_LIST_IS_CONS(LIST) == 1 END
|
||||
@ -51,28 +41,22 @@ 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_LEFT(BOOST_PP_SUB_D, 22, LISTNIL) == 22 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END
|
||||
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LISTNIL) == 0 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_IS_NIL(BOOST_PP_LIST_REVERSE(LISTNIL)) == 1 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_REST_N(2, LIST)) == 52 END
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_REST_N(0, LISTNIL)) == 1 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_SIZE(LISTNIL) == 0 END
|
||||
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LIST)) == 6374 END
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_TRANSFORM(BOOST_PP_ADD_D, 2, LISTNIL)) == 1 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(BOOST_PP_LIST_REST(LIST), LIST)) == 1524152 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(LIST,LISTNIL)) == 4152 END
|
||||
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_APPEND(LISTNIL,LIST)) == 4152 END
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_APPEND(LISTNIL,LISTNIL)) == 1 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
|
||||
@ -80,12 +64,17 @@ 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
|
||||
BEGIN BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_FILTER(BOOST_PP_LESS_D, 3, LISTNIL)) == 1 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_ARRAY_SIZE(BOOST_PP_LIST_TO_ARRAY(LISTNIL)) == 0 END
|
||||
BEGIN BOOST_PP_SEQ_ELEM(3, BOOST_PP_LIST_TO_SEQ(LIST)) == 2 END
|
||||
|
@ -1,14 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 <libs/preprocessor/test/punctuation.cxx>
|
@ -1,14 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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 <libs/preprocessor/test/punctuation.cxx>
|
@ -1,54 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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. */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/punctuation.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define A_TUPLE (*,#,zz)
|
||||
# define A_TUPLE2 (*,#,(zz,44,(e7)))
|
||||
# define A_TUPLE_PLUS (mmf,34,^^,!) 456
|
||||
# define PLUS_ATUPLE yyt (j,ii%)
|
||||
# define JDATA ggh
|
||||
# define NOT_TUPLE y6()
|
||||
# define NOT_TUPLE2 &(kkkgg,(e))
|
||||
# define A_SEQ (r)($)(#)
|
||||
# define AN_ARRAY (4,(5,7,f,x))
|
||||
# define A_LIST (e,(g,(&,BOOST_PP_NIL)))
|
||||
# define DATA (5 + 3) * 4
|
||||
# define DATA2 4 * (5 + 3)
|
||||
# define DATA3 4 * (5 + 3) * (2 + 1)
|
||||
# define DATA4 (5 + 3) * (2 + 1) * 4
|
||||
|
||||
|
||||
// is_begin_parens
|
||||
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS() == 0 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_TUPLE) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_TUPLE2) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_TUPLE_PLUS) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(PLUS_ATUPLE) == 0 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(JDATA) == 0 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(NOT_TUPLE) == 0 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(NOT_TUPLE2) == 0 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_SEQ) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(AN_ARRAY) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_LIST) == 1 END
|
||||
BEGIN BOOST_PP_IS_BEGIN_PARENS((y)2(x)) == 1 END
|
||||
|
||||
// remove_parens
|
||||
|
||||
BEGIN BOOST_PP_REMOVE_PARENS(DATA) == 17 END
|
||||
BEGIN BOOST_PP_REMOVE_PARENS(DATA2)== 32 END
|
||||
BEGIN BOOST_PP_REMOVE_PARENS(DATA3)== 96 END
|
||||
BEGIN BOOST_PP_REMOVE_PARENS(DATA4)== 41 END
|
||||
|
||||
#endif
|
18
test/seq.cxx
18
test/seq.cxx
@ -16,18 +16,13 @@
|
||||
# include <boost/preprocessor/comparison/equal.hpp>
|
||||
# include <boost/preprocessor/comparison/less.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
# include <boost/preprocessor/seq.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/list/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
# define SEQ_NONE ()
|
||||
# define SEQ (4)(1)(5)(2)
|
||||
# define SEQVAR (4,5,8,3,61)(1,0)(5,22,43)(2)(17,45,33)
|
||||
|
||||
@ -58,19 +53,8 @@ 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_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE))) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE)) == 1 END
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3, BOOST_PP_SEQ_TO_ARRAY(SEQ)) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE)) == 1 END
|
||||
|
||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 END
|
||||
|
||||
@ -114,8 +98,6 @@ BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~),
|
||||
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
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ_NONE),0)) == 1 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_SEQ_TO_LIST(SEQ_NONE)) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
|
@ -7,29 +7,21 @@
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* Revised by Edward Diener (2011,2014) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/array/size.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/facilities/is_empty.hpp>
|
||||
# if BOOST_PP_VARIADICS
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# endif
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
|
||||
|
||||
# define TUPLE (0, 1, 2, 3, 4, 5)
|
||||
# define TUPLE_NONE ()
|
||||
# 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)
|
||||
@ -52,7 +44,6 @@
|
||||
|
||||
// elem
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, TUPLE_NONE)) == 1 END
|
||||
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
|
||||
@ -81,30 +72,23 @@ 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_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0,BOOST_PP_TUPLE_TO_ARRAY(1,TUPLE_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_TUPLE_TO_ARRAY(1,TUPLE_NONE)) == 1 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
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(1,TUPLE_NONE), 0)) == 1 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_TUPLE_TO_LIST(1,TUPLE_NONE)) == 1 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
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_ELEM(0,BOOST_PP_TUPLE_TO_SEQ(1,TUPLE_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_TO_SEQ(1,TUPLE_NONE)) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
// elem
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0, TUPLE_NONE)) == 1 END
|
||||
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
|
||||
@ -174,7 +158,7 @@ BEGIN BOOST_PP_TUPLE_ELEM(33, BOOST_PP_TUPLE_PUSH_FRONT(TUPLE_LARGE, 33)) == 32
|
||||
|
||||
// rem
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
#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
|
||||
@ -182,12 +166,6 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
|
||||
#else
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_REM_CAT() TUPLE_NONE) == 1 END
|
||||
#else
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_REM() TUPLE_NONE) == 1 END
|
||||
#endif
|
||||
|
||||
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
|
||||
@ -196,7 +174,6 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
|
||||
// rem_ctor
|
||||
|
||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_NONE)) == 1 END
|
||||
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
|
||||
@ -229,23 +206,17 @@ 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_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0,BOOST_PP_TUPLE_TO_ARRAY(TUPLE_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_TUPLE_TO_ARRAY(TUPLE_NONE)) == 1 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
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(TUPLE_NONE), 0)) == 1 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_TUPLE_TO_LIST(TUPLE_NONE)) == 1 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
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_SEQ_ELEM(0,BOOST_PP_TUPLE_TO_SEQ(TUPLE_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_TO_SEQ(TUPLE_NONE)) == 1 END
|
||||
|
||||
#endif
|
||||
|
@ -1,38 +0,0 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
#define TN_GEN_ONE(p) (1)
|
||||
#define TN_GEN_ZERO(p) (0)
|
||||
#define TN_TEST_ONE_MORE(parameter,ens) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(1,0,ens),0), \
|
||||
TN_GEN_ONE, \
|
||||
TN_GEN_ZERO \
|
||||
) \
|
||||
(parameter) \
|
||||
/**/
|
||||
#define TN_TEST_ONE(parameter,ens) \
|
||||
BOOST_PP_TUPLE_ELEM \
|
||||
( \
|
||||
1, \
|
||||
0, \
|
||||
TN_TEST_ONE_MORE(parameter,ens) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
BEGIN TN_TEST_ONE(A,(1)) == 1 END
|
||||
BEGIN TN_TEST_ONE(A,()) == 0 END
|
Reference in New Issue
Block a user