mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-07-30 04:07:14 +02:00
Merge branch 'develop' into master
This commit is contained in:
33
.travis.yml
33
.travis.yml
@ -108,7 +108,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-8
|
compiler: g++-8
|
||||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
|
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -118,7 +118,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-9
|
compiler: g++-9
|
||||||
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
|
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -126,6 +126,17 @@ matrix:
|
|||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
compiler: g++-10
|
||||||
|
env: TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-10
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||||
@ -220,7 +231,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-6.0
|
compiler: clang++-6.0
|
||||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -230,7 +241,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-7
|
compiler: clang++-7
|
||||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -241,7 +252,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-8
|
compiler: clang++-8
|
||||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -262,6 +273,18 @@ matrix:
|
|||||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
|
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
|
||||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: clang++-10
|
||||||
|
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-10
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
compiler: clang++-libc++
|
compiler: clang++-libc++
|
||||||
|
@ -23,7 +23,7 @@ branches:
|
|||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
|
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
TOOLSET: msvc-14.1
|
TOOLSET: msvc-14.1
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
@ -35,7 +35,7 @@ blockquote.epigraph {
|
|||||||
dd {
|
dd {
|
||||||
margin-bottom: 0.5em }
|
margin-bottom: 0.5em }
|
||||||
|
|
||||||
/* Uncomment (& remove this text!) to get bold-faced definition list terms
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||||
dt {
|
dt {
|
||||||
font-weight: bold }
|
font-weight: bold }
|
||||||
*/
|
*/
|
||||||
|
@ -1,37 +1,52 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_ARRAY_ENUM</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
</head>
|
<title>BOOST_PP_ARRAY_ENUM</title>
|
||||||
<body>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_ENUM</b> macro converts an <i>array</i> to its comma-separated elements. The comma-separated elements are in the form of <i>variadic data</i>.<br>
|
</head>
|
||||||
</div>
|
<body>
|
||||||
<h4> Usage </h4>
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_ENUM</b>
|
||||||
<div class="code"> <b>BOOST_PP_ARRAY_ENUM</b>(<i>array</i>) </div>
|
macro converts an <i>array</i> to its comma-separated elements.
|
||||||
<h4> Arguments </h4>
|
The comma-separated elements are in the form of <i>variadic data</i>.<br>
|
||||||
<dl>
|
</div>
|
||||||
<dt>array</dt>
|
<h4> Usage </h4>
|
||||||
<dd> The <i>array</i> whose elements are to be converted. </dd>
|
<div class="code"> <b>BOOST_PP_ARRAY_ENUM</b>(<i>array</i>) </div>
|
||||||
</dl>
|
<h4> Arguments </h4>
|
||||||
<h4> Remarks </h4>
|
<dl>
|
||||||
<div> This macro expands to a comma-separated list of the elements in <i>array</i>.
|
<dt>array</dt>
|
||||||
For example, <b>BOOST_PP_ARRAY_ENUM</b>((3,(<i>x,</i><i>y,</i><i>z</i>)))
|
<dd> The <i>array</i> whose elements are to be converted. </dd>
|
||||||
expands to...
|
</dl>
|
||||||
<div> <i>x</i>, <i>y</i>, <i>z</i> </div>
|
<h4> Remarks </h4>
|
||||||
</div>
|
<div> This macro expands to a comma-separated list of the elements
|
||||||
<h4> Requirements </h4>
|
in <i>array</i>.
|
||||||
<div> <b>Header:</b> <a href="../headers/array/enum.html"><boost/preprocessor/array/enum.hpp></a>
|
For example, <b>BOOST_PP_ARRAY_ENUM</b>((3,(<i>x,</i><i>y,</i><i>z</i>)))
|
||||||
</div>
|
expands
|
||||||
<h4> Sample Code </h4>
|
to...
|
||||||
<div>
|
<div> <i>x</i>, <i>y</i>, <i>z<br>
|
||||||
<pre>#include <<a href="../headers/array/enum.html">boost/preprocessor/array/enum.hpp</a>><br><br>#define ARRAY (5,(B,O,O,S,T))<br><br><a href="array_enum.html">BOOST_PP_ARRAY_ENUM</a>(ARRAY) // expands to B, O, O, S, T<br></pre>
|
</i> </div>
|
||||||
</div>
|
</div>
|
||||||
<hr size="1">
|
<p> In <a
|
||||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
<div style="margin-left: 0px;">
|
20</a> mode if the array is empty the resulting <i>variadic</i>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
<i>data</i> will be empty.</p>
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
<h4> </h4>
|
||||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
<h4>Requirements </h4>
|
||||||
</div>
|
<div> <b>Header:</b> <a href="../headers/array/enum.html"><boost/preprocessor/array/enum.hpp></a>
|
||||||
</body>
|
</div>
|
||||||
|
<h4> Sample Code </h4>
|
||||||
|
<div>
|
||||||
|
<pre>#include <<a href="../headers/array/enum.html">boost/preprocessor/array/enum.hpp</a>><br><br>#define ARRAY (5,(B,O,O,S,T))<br><br><a href="array_enum.html">BOOST_PP_ARRAY_ENUM</a>(ARRAY) // expands to B, O, O, S, T<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>
|
</html>
|
||||||
|
@ -1,62 +1,62 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_LIST_ENUM</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
</head>
|
<title>BOOST_PP_LIST_ENUM</title>
|
||||||
<body>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<div style="margin-left: 0px;">
|
</head>
|
||||||
The <b>BOOST_PP_LIST_ENUM</b> macro converts a <i>list</i> to a comma-separated list.
|
<body>
|
||||||
</div>
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_ENUM</b> macro
|
||||||
<h4>Usage</h4>
|
converts a <i>list</i> to a comma-separated list. </div>
|
||||||
<div class="code">
|
<h4>Usage</h4>
|
||||||
<b>BOOST_PP_LIST_ENUM</b>(<i>list</i>)
|
<div class="code"> <b>BOOST_PP_LIST_ENUM</b>(<i>list</i>) </div>
|
||||||
</div>
|
<h4>Arguments</h4>
|
||||||
<h4>Arguments</h4>
|
<dl>
|
||||||
<dl>
|
<dt>list</dt>
|
||||||
<dt>list</dt>
|
<dd> The <i>list</i> to be converted. </dd>
|
||||||
<dd>
|
</dl>
|
||||||
The <i>list</i> to be converted.
|
<h4>Remarks</h4>
|
||||||
</dd>
|
<div> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>,
|
||||||
</dl>
|
<b>BOOST_PP_NIL</b>))), this macro will produce:
|
||||||
<h4>Remarks</h4>
|
<div> <i>a</i>, <i>b</i>, <i>c</i> </div>
|
||||||
<div>
|
</div>
|
||||||
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
<div> Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
||||||
this macro will produce:
|
|
||||||
<div>
|
There is no longer any such restriction. It is more
|
||||||
<i>a</i>, <i>b</i>, <i>c</i>
|
efficient, however, to use <b>BOOST_PP_LIST_ENUM_R</b> in such a
|
||||||
</div>
|
situation.<br>
|
||||||
</div>
|
<br>
|
||||||
<div>
|
In <a
|
||||||
Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
There is no longer any such restriction.
|
20</a> mode if the list is empty the resulting <i>variadic</i>
|
||||||
It is more efficient, however, to use <b>BOOST_PP_LIST_ENUM_R</b> in such a situation.
|
<i>data</i> will be empty.</div>
|
||||||
</div>
|
<h4>See Also</h4>
|
||||||
<h4>See Also</h4>
|
<ul>
|
||||||
<ul>
|
<li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
|
||||||
<li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
|
</ul>
|
||||||
</ul>
|
<h4>Requirements</h4>
|
||||||
<h4>Requirements</h4>
|
<div> <b>Header:</b> <a href="../headers/list/enum.html"><boost/preprocessor/list/enum.hpp></a>
|
||||||
<div>
|
</div>
|
||||||
<b>Header:</b> <a href="../headers/list/enum.html"><boost/preprocessor/list/enum.hpp></a>
|
<h4>Sample Code</h4>
|
||||||
</div>
|
<div>
|
||||||
<h4>Sample Code</h4>
|
<pre>#include <<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>>
|
||||||
<div><pre>
|
|
||||||
#include <<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>>
|
|
||||||
|
|
||||||
#define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))
|
#define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))
|
||||||
|
|
||||||
<a href="list_enum.html">BOOST_PP_LIST_ENUM</a>(LIST) // expands to w, x, y, z
|
<a href="list_enum.html">BOOST_PP_LIST_ENUM</a>(LIST) // expands to w, x, y, z
|
||||||
</pre></div>
|
</pre>
|
||||||
<hr size="1">
|
</div>
|
||||||
<div style="margin-left: 0px;">
|
<hr size="1">
|
||||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a
|
||||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
|
||||||
</div>
|
2002</i> <br>
|
||||||
<div style="margin-left: 0px;">
|
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
<div style="margin-left: 0px;">
|
||||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
copy at <a href=
|
1.0. (See accompanying file <a
|
||||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||||
</div>
|
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -31,6 +31,12 @@
|
|||||||
<i>a</i>, <i>b</i>, <i>c</i>
|
<i>a</i>, <i>b</i>, <i>c</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
In <a
|
||||||
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
|
20</a> mode if the list is empty the resulting <i>variadic</i>
|
||||||
|
<i>data</i> will be empty.
|
||||||
|
</div>
|
||||||
<h4>See Also</h4>
|
<h4>See Also</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="list_enum.html">BOOST_PP_LIST_ENUM</a></li>
|
<li><a href="list_enum.html">BOOST_PP_LIST_ENUM</a></li>
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
<meta content="text/html; charset=windows-1252"
|
||||||
|
http-equiv="content-type">
|
||||||
<title>BOOST_PP_OVERLOAD</title>
|
<title>BOOST_PP_OVERLOAD</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_OVERLOAD</b> variadic
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_OVERLOAD</b>
|
||||||
macro expands to the name of a non-variadic macro having a given number of
|
variadic macro expands to the name of a non-variadic macro having
|
||||||
parameters.<br>
|
a given number of parameters.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Usage</h4>
|
<h4>Usage</h4>
|
||||||
<div class="code"> <b>BOOST_PP_OVERLOAD</b>(<i>prefix</i>,...) <a href="../topics/variadic_macros.html#VNotation"
|
<div class="code"> <b>BOOST_PP_OVERLOAD</b>(<i>prefix</i>,...) <a
|
||||||
target="_self"><sup>(v)</sup></a><br>
|
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Arguments</h4>
|
<h4>Arguments</h4>
|
||||||
<dl>
|
<dl>
|
||||||
@ -20,39 +22,43 @@
|
|||||||
<dd> The prefix of the non-variadic macro name. </dd>
|
<dd> The prefix of the non-variadic macro name. </dd>
|
||||||
<dt>...<br>
|
<dt>...<br>
|
||||||
</dt>
|
</dt>
|
||||||
<dd><i> Variadic data</i>. The number of variadic data
|
<dd><i> Variadic data</i>. The number of variadic data elements,
|
||||||
elements, as determined by BOOST_PP_VARIADIC_SIZE, is appended to the
|
as determined by BOOST_PP_VARIADIC_SIZE, is appended to the
|
||||||
prefix to form the output non-variadic macro name.<br>
|
prefix to form the output non-variadic macro name.<br>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h4>Remarks</h4>
|
<h4>Remarks</h4>
|
||||||
<div> This macro creates a macro name which depends on the number of
|
<div> This macro creates a macro name which depends on the number of
|
||||||
elements of variadic data. It should be used in the form of <br>
|
elements of variadic data. It should be used in the form of <br>
|
||||||
BOOST_PP_OVERLOAD(MACRO_NAME_,__VA_ARGS__)(__VA_ARGS__) in order to
|
BOOST_PP_OVERLOAD(MACRO_NAME_,__VA_ARGS__)(__VA_ARGS__) in order
|
||||||
call a non-variadic macro taking a given number of variadic data
|
to call a non-variadic macro taking a given number of variadic
|
||||||
elements as non-variadic arguments. In this way one can invoke a
|
data elements as non-variadic arguments. In this way one can
|
||||||
variadic macro with a variable number of parameters which calls one of
|
invoke a variadic macro with a variable number of parameters which
|
||||||
a series of non-variadic macros doing very similar things.
|
calls one of a series of non-variadic macros doing very similar
|
||||||
|
things.<br>
|
||||||
|
<br>
|
||||||
|
In <a
|
||||||
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
|
|
||||||
|
20</a> mode the <i>variadic</i> <i>data</i> can be empty and
|
||||||
|
the given number of parameters will be 0.<br>
|
||||||
</div>
|
</div>
|
||||||
<b>Requirements</b>
|
<b>Requirements</b>
|
||||||
<div> <b>Header:</b> <a href="../headers/facilities/overload.html"><boost/preprocessor/facilities/overload.hpp></a>
|
<div> <b>Header:</b> <a
|
||||||
|
href="../headers/facilities/overload.html"><boost/preprocessor/facilities/overload.hpp></a>
|
||||||
</div>
|
</div>
|
||||||
<h4>Sample Code</h4>
|
<h4>Sample Code</h4>
|
||||||
<div>
|
<div>
|
||||||
<pre>#include <<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>><br>#include <<a
|
<pre>#include <<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>><br>#include <<a href="../headers/cat.html">boost/preprocessor/cat.hpp</a>><br>#include <<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>><br>#include <<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>><br><br>#define MACRO_1(number) MACRO_2(number,10)<br>#define MACRO_2(number1,number2) <a href="add.html">BOOST_PP_ADD</a>(number1,number2)<br><br>#if !BOOST_PP_VARIADICS_MSVC<br><br>#define MACRO_ADD_NUMBERS(...) <a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__)<br><br>#else<br><br>// or for Visual C++<br><br>#define MACRO_ADD_NUMBERS(...) \<br> <a href="cat.html">BOOST_PP_CAT</a>(<a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__),<a href="empty.html">BOOST_PP_EMPTY</a>())<br><br>#endif<br><br>MACRO_ADD_NUMBERS(5) // output is 15<br>MACRO_ADD_NUMBERS(3,6) // output is 9</pre>
|
||||||
href="../headers/cat.html">boost/preprocessor/cat.hpp</a>><br>#include <<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>><br>#include <<a
|
</div>
|
||||||
href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>><br><br>#define MACRO_1(number) MACRO_2(number,10)<br>#define MACRO_2(number1,number2) <a
|
<hr size="1">
|
||||||
href="add.html">BOOST_PP_ADD</a>(number1,number2)<br><br>#if !BOOST_PP_VARIADICS_MSVC<br><br>#define MACRO_ADD_NUMBERS(...) <a
|
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener
|
||||||
href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__)<br><br>#else<br><br>// or for Visual C++<br><br>#define MACRO_ADD_NUMBERS(...) \<br> <a
|
2011,2013,2016</i> </div>
|
||||||
href="cat.html">BOOST_PP_CAT</a>(<a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__),<a
|
<div style="margin-left: 0px;">
|
||||||
href="empty.html">BOOST_PP_EMPTY</a>())<br><br>#endif<br><br>MACRO_ADD_NUMBERS(5) // output is 15<br>MACRO_ADD_NUMBERS(3,6) // output is 9</pre>
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
</div>
|
1.0.
|
||||||
<hr size="1">
|
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013,2016</i> </div>
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
<div style="margin-left: 0px;">
|
</div>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
</body>
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
</html>
|
||||||
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,33 +1,46 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_VARIADIC_SIZE</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
</head>
|
<title>BOOST_PP_VARIADIC_SIZE</title>
|
||||||
<body>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_SIZE</b> variadic macro
|
</head>
|
||||||
expands to the size of the <i>variadic data </i>passed to it. </div>
|
<body>
|
||||||
<h4>Usage</h4>
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_SIZE</b>
|
||||||
<div class="code"> <b>BOOST_PP_VARIADIC_SIZE</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
variadic macro
|
||||||
</div>
|
expands to the size of the <i>variadic data </i>passed to it. </div>
|
||||||
<h4>Arguments</h4>
|
<h4>Usage</h4>
|
||||||
<dl>
|
<div class="code"> <b>BOOST_PP_VARIADIC_SIZE</b>(<i>...</i>) <a
|
||||||
<dt>...<br>
|
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||||
</dt>
|
</div>
|
||||||
<dd> <i>Variadic data </i>whose size is to be extracted. </dd>
|
<h4>Arguments</h4>
|
||||||
</dl>
|
<dl>
|
||||||
<h4>Requirements</h4>
|
<dt>...<br>
|
||||||
<div> <b>Header:</b> <a href="../headers/variadic/size.html"><boost/preprocessor/variadic/size.hpp></a>
|
</dt>
|
||||||
</div>
|
<dd> <i>Variadic data </i>whose size is to be extracted.</dd>
|
||||||
<h4>Sample Code</h4>
|
</dl>
|
||||||
<div>
|
<h4>Remarks</h4>
|
||||||
<pre>#include <<a href="../headers/variadic/size.html">boost/preprocessor/variadic/size.hpp</a>><br><br>#define VAR_DATA x, y, z<br><br><a href="variadic_size.html">BOOST_PP_VARIADIC_SIZE</a>(VAR_DATA) // expands to 3<br></pre>
|
<p> In <a
|
||||||
</div>
|
href="../topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
<hr size="1">
|
20</a> mode the <i>variadic</i> <i>data</i> can be empty and
|
||||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013</i> </div>
|
the result will be 0.<br>
|
||||||
<div style="margin-left: 0px;">
|
</p>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
<h4>Requirements</h4>
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
<div> <b>Header:</b> <a href="../headers/variadic/size.html"><boost/preprocessor/variadic/size.hpp></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>
|
||||||
</div>
|
<h4>Sample Code</h4>
|
||||||
</body>
|
<div>
|
||||||
|
<pre>#include <<a href="../headers/variadic/size.html">boost/preprocessor/variadic/size.hpp</a>><br><br>#define VAR_DATA x, y, z<br><br><a href="variadic_size.html">BOOST_PP_VARIADIC_SIZE</a>(VAR_DATA) // expands to 3<br></pre>
|
||||||
|
</div>
|
||||||
|
<hr size="1">
|
||||||
|
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener
|
||||||
|
2011,2013</i> </div>
|
||||||
|
<div style="margin-left: 0px;">
|
||||||
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
|
1.0.
|
||||||
|
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,32 +1,45 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_VARIADIC_TO_ARRAY</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
</head>
|
<title>BOOST_PP_VARIADIC_TO_ARRAY</title>
|
||||||
<body>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_ARRAY</b> variadic macro
|
</head>
|
||||||
converts <i>variadic data</i> to an <i>array</i>. </div>
|
<body>
|
||||||
<h4> Usage </h4>
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_ARRAY</b>
|
||||||
<div class="code"> <b>BOOST_PP_VARIADIC_TO_ARRAY</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
variadic macro
|
||||||
</div>
|
converts <i>variadic data</i> to an <i>array</i>. </div>
|
||||||
<h4> Arguments </h4>
|
<h4> Usage </h4>
|
||||||
<dl>
|
<div class="code"> <b>BOOST_PP_VARIADIC_TO_ARRAY</b>(<i>...</i>) <a
|
||||||
<dt>...</dt>
|
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||||
<dd> The <i>variadic data</i> to be converted. </dd>
|
</div>
|
||||||
</dl>
|
<h4> Arguments </h4>
|
||||||
<h4> Requirements </h4>
|
<dl>
|
||||||
<div> <b>Header:</b> <a href="../headers/variadic/to_array.html"><boost/preprocessor/variadic/to_array.hpp></a>
|
<dt>...</dt>
|
||||||
</div>
|
<dd> The <i>variadic data</i> to be converted.</dd>
|
||||||
<h4> Sample Code </h4>
|
</dl>
|
||||||
<div>
|
<h4>Remarks</h4>
|
||||||
<pre>#include <<a href="../headers/variadic/to_array.html">boost/preprocessor/variadic/to_array.hpp</a>><br><br>#define VAR_DATA a, b, c<br><br><a href="variadic_to_array.html">BOOST_PP_VARIADIC_TO_ARRAY</a>(VAR_DATA) // expands to (3, (a, b, c))<br></pre>
|
<p> In <a
|
||||||
</div>
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
<hr size="1">
|
20</a> mode the <i>variadic</i> <i>data</i> can be empty and
|
||||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013</i> </div>
|
the result will be an empty array of the form '(0,())'.</p>
|
||||||
<div style="margin-left: 0px;">
|
<h4> Requirements </h4>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
<div> <b>Header:</b> <a
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
href="../headers/variadic/to_array.html"><boost/preprocessor/variadic/to_array.hpp></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>
|
||||||
</div>
|
<h4> Sample Code </h4>
|
||||||
</body>
|
<div>
|
||||||
|
<pre>#include <<a href="../headers/variadic/to_array.html">boost/preprocessor/variadic/to_array.hpp</a>><br><br>#define VAR_DATA a, b, c<br><br><a href="variadic_to_array.html">BOOST_PP_VARIADIC_TO_ARRAY</a>(VAR_DATA) // expands to (3, (a, b, c))<br></pre>
|
||||||
|
</div>
|
||||||
|
<hr size="1">
|
||||||
|
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener
|
||||||
|
2011,2013</i> </div>
|
||||||
|
<div style="margin-left: 0px;">
|
||||||
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
|
1.0.
|
||||||
|
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,31 +1,45 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>BOOST_PP_VARIADIC_TO_LIST</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
</head>
|
<title>BOOST_PP_VARIADIC_TO_LIST</title>
|
||||||
<body>
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_LIST</b>
|
</head>
|
||||||
variadic macro converts <i>variadic data</i> to a <i>list</i>. </div>
|
<body>
|
||||||
<h4>Usage</h4>
|
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_LIST</b>
|
||||||
<div class="code"> <b>BOOST_PP_VARIADIC_TO_LIST</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
variadic macro converts <i>variadic data</i> to a <i>list</i>. </div>
|
||||||
</div>
|
<h4>Usage</h4>
|
||||||
<h4>Arguments</h4>
|
<div class="code"> <b>BOOST_PP_VARIADIC_TO_LIST</b>(<i>...</i>) <a
|
||||||
<dl><dt>...</dt>
|
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||||
<dd> The <i>variadic data</i> to be converted.<br>
|
</div>
|
||||||
</dd>
|
<h4>Arguments</h4>
|
||||||
</dl><h4>Requirements</h4>
|
<dl>
|
||||||
<div> <b>Header:</b> <a href="../headers/variadic/to_list.html"><boost/preprocessor/variadic/to_list.hpp></a>
|
<dt>...</dt>
|
||||||
</div>
|
<dd> The <i>variadic data</i> to be converted.<br>
|
||||||
<h4>Sample Code</h4>
|
</dd>
|
||||||
<div>
|
</dl>
|
||||||
<pre>#include <<a href="../headers/variadic/to_list.html">boost/preprocessor/variadic/to_list.hpp</a>><br><br><a href="variadic_to_list.html">BOOST_PP_VARIADIC_TO_LIST</a>(x, y, z)<br> // expands to (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))<br></pre>
|
<h4>Remarks</h4>
|
||||||
</div>
|
<p> In <a
|
||||||
<hr size="1">
|
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#C20_Support_For_Variadic_Macros">C++
|
||||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013</i> </div>
|
20</a> mode the <i>variadic</i> <i>data</i> can be empty and
|
||||||
<div style="margin-left: 0px;">
|
the result will be an empty list of the form 'BOOST_PP_NIL'.</p>
|
||||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
<h4>Requirements</h4>
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
<div> <b>Header:</b> <a
|
||||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
href="../headers/variadic/to_list.html"><boost/preprocessor/variadic/to_list.hpp></a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
<h4>Sample Code</h4>
|
||||||
|
<div>
|
||||||
|
<pre>#include <<a href="../headers/variadic/to_list.html">boost/preprocessor/variadic/to_list.hpp</a>><br><br><a href="variadic_to_list.html">BOOST_PP_VARIADIC_TO_LIST</a>(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,2013</i> </div>
|
||||||
|
<div style="margin-left: 0px;">
|
||||||
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
|
1.0.
|
||||||
|
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||||
|
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,282 +1,287 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
<meta content="text/html; charset=windows-1252"
|
||||||
|
http-equiv="content-type">
|
||||||
<title>variadic_macros.html</title>
|
<title>variadic_macros.html</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||||
<style>
|
<style>
|
||||||
u { font-weight: normal; text-decoration: none; }
|
u { font-weight: normal; text-decoration: none; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h4>Variadic Macros</h4>
|
<h4>Variadic Macros</h4>
|
||||||
<div> Variadic macros are supported by a number of compilers. They are
|
<div> Variadic macros are supported by a number of compilers. They
|
||||||
macros of the form: </div>
|
are macros of the form: </div>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__</pre>
|
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__</pre>
|
||||||
</div>
|
</div>
|
||||||
<div> The '...' in the parameter list represents the variadic data when the
|
<div> The '...' in the parameter list represents the variadic data
|
||||||
macro is invoked and the __VA_ARGS__ in the expansion represents the
|
when the macro is invoked and the __VA_ARGS__ in the expansion
|
||||||
variadic data in the expansion of the macro. Variadic data is of the form
|
represents the variadic data in the expansion of the macro.
|
||||||
of 1 or more preprocessor tokens separated by commas.<br>
|
Variadic data is of the form of 1 or more preprocessor tokens
|
||||||
|
separated by commas.<br>
|
||||||
<br>
|
<br>
|
||||||
The '...' must be the last parameter in the macro definition and there may
|
The '...' must be the last parameter in the macro definition and
|
||||||
be 0 or more non-variadic parameters preceding it.<br>
|
there may be 0 or more non-variadic parameters preceding it.<br>
|
||||||
<br>
|
<br>
|
||||||
In the expansion of the macro __VA_ARGS__ may be specified 0 or more times
|
In the expansion of the macro __VA_ARGS__ may be specified 0 or
|
||||||
to represent the variadic data. The variadic data in the expansion is a
|
more times to represent the variadic data. The variadic data in
|
||||||
comma separated list of preprocessor tokens representing the variadic data
|
the expansion is a comma separated list of preprocessor tokens
|
||||||
which the invoker of the macro enters as the last arguments to the macro.<br>
|
representing the variadic data which the invoker of the macro
|
||||||
|
enters as the last arguments to the macro.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>#define INITIALIZE_INT_ARRAY(array_name,...) \ <br> static int array_name[] = { __VA_ARGS__ }; \ <br> /**/<br><br> INITIALIZE_INT_ARRAY(myname,45,789,33510,9346,2)</pre>
|
<pre>#define INITIALIZE_INT_ARRAY(array_name,...) \ <br> static int array_name[] = { __VA_ARGS__ }; \ <br> /**/<br><br> INITIALIZE_INT_ARRAY(myname,45,789,33510,9346,2)</pre>
|
||||||
</div>
|
</div>
|
||||||
<u> <span style="font-weight: bold;">Preprocessor
|
<u> <span style="font-weight: bold;">Preprocessor Library Support<br>
|
||||||
Library Support<br>
|
|
||||||
</span></u>
|
</span></u>
|
||||||
<div>The library offers support for variadic macros for those
|
<div>The library offers support for variadic macros for those
|
||||||
compilers
|
compilers which support the feature. The library can automatically
|
||||||
which support the feature. The library can automatically detect whether
|
detect whether a compiler supports variadic macros and sets the
|
||||||
a compiler supports variadic macros and sets the macro
|
macro BOOST_PP_VARIADICS accordingly to 1 if the compiler supports
|
||||||
BOOST_PP_VARIADICS accordingly to 1 if the compiler supports variadic
|
variadic macros or 0 if the compiler does not support variadic
|
||||||
macros or 0 if the compiler does not support variadic macros.<br>
|
macros.<br>
|
||||||
<br>
|
<br>
|
||||||
The end-user can #define BOOST_PP_VARIADICS to 1 or 0 himself in a
|
The end-user can #define BOOST_PP_VARIADICS to 1 or 0 himself in a
|
||||||
translation unit, before including any preprocessor header files, to
|
translation unit, before including any preprocessor header files,
|
||||||
prevent the library from attempting to detect whether the compiler
|
to prevent the library from attempting to detect whether the
|
||||||
supports variadic macros. This has the effect of manually turning on or
|
compiler supports variadic macros. This has the effect of manually
|
||||||
off variadic macro support in the library. Of course if one manually
|
turning on or off variadic macro support in the library. Of course
|
||||||
turns on variadic macro support in the library, and one's compiler does
|
if one manually turns on variadic macro support in the library,
|
||||||
not support variadic macros, functionality in the library which uses
|
and one's compiler does not support variadic macros, functionality
|
||||||
variadic macros will fail with error messages from the compiler.<br>
|
in the library which uses variadic macros will fail with error
|
||||||
|
messages from the compiler.<br>
|
||||||
<br>
|
<br>
|
||||||
When BOOST_PP_VARIADICS is 1, the library offers some extended
|
When BOOST_PP_VARIADICS is 1, the library offers some extended
|
||||||
functionality
|
functionality by using variadic macros, and also offers extended
|
||||||
by using variadic macros, and also offers extended support for working
|
support for working with variadic data.<br>
|
||||||
with variadic data.<br><br>
|
|
||||||
<a name="vmvcquirk"></a>Visual C++ has a
|
|
||||||
few quirks related to variadic macros which require the end-user to code
|
|
||||||
slightly differently. When BOOST_PP_VARIADICS is 1 and Visual C++ is the
|
|
||||||
compiler BOOST_PP_VARIADICS_MSVC is 1, else when BOOST_PP_VARIADICS is 1
|
|
||||||
and Visual C++ is not the compiler BOOST_PP_VARIADICS_MSVC is 0. When
|
|
||||||
BOOST_PP_VARIADICS is 0 then BOOST_PP_VARIADICS_MSVC is not defined.
|
|
||||||
In this way the end-user, when using variadic macros, can test for the
|
|
||||||
presence of Visual C++ as the compiler and code accordingly.<br>
|
|
||||||
<br>
|
<br>
|
||||||
Support for working with variadic
|
<a name="vmvcquirk"></a>Visual C++ has a few quirks related to
|
||||||
data is largely centered on being able to convert variadic data to
|
variadic macros which require the end-user to code slightly
|
||||||
other library data types, since the
|
differently. When BOOST_PP_VARIADICS is 1 and Visual C++ is the
|
||||||
functionality for working with those Boost preprocessor library data
|
compiler BOOST_PP_VARIADICS_MSVC is 1, else when
|
||||||
types is much greater than that for working with variadic data directly.<br>
|
BOOST_PP_VARIADICS is 1 and Visual C++ is not the compiler
|
||||||
|
BOOST_PP_VARIADICS_MSVC is 0. When BOOST_PP_VARIADICS is 0 then
|
||||||
|
BOOST_PP_VARIADICS_MSVC is not defined. In this way the end-user,
|
||||||
|
when using variadic macros, can test for the presence of Visual
|
||||||
|
C++ as the compiler and code accordingly.<br>
|
||||||
|
<br>
|
||||||
|
Support for working with variadic data is largely centered on
|
||||||
|
being able to convert variadic data to other library data types,
|
||||||
|
since the functionality for working with those Boost preprocessor
|
||||||
|
library data types is much greater than that for working with
|
||||||
|
variadic data directly.<br>
|
||||||
</div>
|
</div>
|
||||||
<a name="VNotation"></a>
|
<a name="VNotation"></a>
|
||||||
<h4>Notation For Variadic Macros<br>
|
<h4>Notation For Variadic Macros<br>
|
||||||
</h4>
|
</h4>
|
||||||
<div>In the documentation, headers which have variadic macros,
|
<div>In the documentation, headers which have variadic macros, and
|
||||||
and
|
variadic macros themselves, have a notation of '(v)' appended to
|
||||||
variadic macros themselves, have a notation of '(v)' appended to them.
|
them. For the variadic macros themselves this signifies that
|
||||||
For the variadic macros themselves this signifies that
|
BOOST_PP_VARIADICS must be 1 for those variadic macros to be
|
||||||
BOOST_PP_VARIADICS must be 1 for those variadic macros to be usable.
|
usable. For variadic macros which have a non-variadic equivalent,
|
||||||
For variadic macros which have a non-variadic equivalent, the
|
the non-variadic equivalent will be used if BOOST_PP_VARIADICS is
|
||||||
non-variadic equivalent will be used if BOOST_PP_VARIADICS is set to 0.
|
set to 0. </div>
|
||||||
</div>
|
|
||||||
<h4>Extended Functionality Using Variadic Macros<br>
|
<h4>Extended Functionality Using Variadic Macros<br>
|
||||||
</h4>
|
</h4>
|
||||||
<div>Some macros in the library offer extended
|
<div>Some macros in the library offer extended functionality through
|
||||||
functionality through the use of variadic macros.<br>
|
the use of variadic macros.<br>
|
||||||
<br>
|
<br>
|
||||||
The variadic macro version offers the same functionality
|
The variadic macro version offers the same functionality as the
|
||||||
as the non-variadic version, but because of the ability of the variadic
|
non-variadic version, but because of the ability of the variadic
|
||||||
parameters to encompass a variable number of arguments, it also offers
|
parameters to encompass a variable number of arguments, it also
|
||||||
an enhanced syntax using the same macro name.<br>
|
offers an enhanced syntax using the same macro name.<br>
|
||||||
<br>
|
<br>
|
||||||
The macros in the library which offer this enhanced functionality are
|
The macros in the library which offer this enhanced functionality
|
||||||
all
|
are all centered on <i>tuple</i> manipulation. With variadic
|
||||||
centered on <i>tuple</i> manipulation. With variadic
|
macros it is possible to manipulate tuples without having to know
|
||||||
macros it is
|
the size of the tuple. So while the invoker can still specify the
|
||||||
possible to
|
size when using tuple macro functionality, there are variadic
|
||||||
manipulate tuples without having to know the size of the tuple. So
|
versions of each of the tuple macros, with the exact same name as
|
||||||
while the invoker can still specify the size when using tuple macro
|
the non-variadic macro, where the size need not be specified.<br>
|
||||||
functionality, there are variadic versions of each of the tuple macros,
|
|
||||||
with the exact same name as the non-variadic macro, where the size need
|
|
||||||
not be specified.<br>
|
|
||||||
</div>
|
</div>
|
||||||
<h4>Extended Support For Variadic Data</h4>
|
<h4>Extended Support For Variadic Data</h4>
|
||||||
<div>The library offers extended support for working with
|
<div>The library offers extended support for working with variadic
|
||||||
variadic data
|
data which goes beyond the functionality offered by the C++
|
||||||
which goes beyond the functionality offered by the C++ specification
|
specification for variadic macros. It does this through
|
||||||
for variadic macros. It does this through preprocessor programming and
|
preprocessor programming and by using some of the other
|
||||||
by using some of the other functionality in the library itself. Header
|
functionality in the library itself. Header and macro names in the
|
||||||
and macro names
|
library which offer extended support for working with variadic
|
||||||
in the library which offer extended support for working with variadic
|
data, and need the compiler to support variadic macros, are marked
|
||||||
data, and need the compiler to support variadic macros, are marked with
|
with a (v)<sup> </sup>to indicate a variadic macro.<br>
|
||||||
a (v)<sup> </sup>to indicate a variadic macro.<br>
|
|
||||||
<br>
|
<br>
|
||||||
The form of the functionality which the library offers is centered on
|
The form of the functionality which the library offers is centered
|
||||||
two macros which work with variadic data itself, and a set of macros
|
on two macros which work with variadic data itself, and a set of
|
||||||
which convert between variadic data and other library data
|
macros which convert between variadic data and other library data
|
||||||
types.<br>
|
types.<br>
|
||||||
<br>
|
<br>
|
||||||
The two macros are BOOST_PP_VARIADIC_ELEM and BOOST_PP_VARIADIC_SIZE,
|
The two macros are BOOST_PP_VARIADIC_ELEM and
|
||||||
which respectively return a particular token of variadic data and the
|
BOOST_PP_VARIADIC_SIZE, which respectively return a particular
|
||||||
number of tokens of variadic data.<br>
|
token of variadic data and the number of tokens of variadic data.<br>
|
||||||
<br>
|
<br>
|
||||||
The macros for converting variadic data to the library's data types are
|
The macros for converting variadic data to the library's data
|
||||||
BOOST_PP_VARIADIC_TO_ARRAY, BOOST_PP_VARIADIC_TO_LIST,
|
types are BOOST_PP_VARIADIC_TO_ARRAY, BOOST_PP_VARIADIC_TO_LIST,
|
||||||
BOOST_PP_VARIADIC_TO_SEQ, and BOOST_PP_VARIADIC_TO_TUPLE.<br>
|
BOOST_PP_VARIADIC_TO_SEQ, and BOOST_PP_VARIADIC_TO_TUPLE.<br>
|
||||||
<br>
|
<br>
|
||||||
All of these macros need compiler support for variadic data and only
|
All of these macros need compiler support for variadic data and
|
||||||
exist if BOOST_PP_VARIADICS is 1. <br>
|
only exist if BOOST_PP_VARIADICS is 1. <br>
|
||||||
<br>
|
<br>
|
||||||
The remaining four macros, which convert from a library data type
|
The remaining four macros, which convert from a library data type
|
||||||
to comma-separated preprocessor tokens, which is the form of
|
to comma-separated preprocessor tokens, which is the form of
|
||||||
variadic data, do not need compiler support for variadic
|
variadic data, do not need compiler support for variadic macros.
|
||||||
macros. These functions are BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM,
|
These functions are BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM,
|
||||||
BOOST_PP_SEQ_ENUM, and BOOST_PP_TUPLE_ENUM. However if one wishes to
|
BOOST_PP_SEQ_ENUM, and BOOST_PP_TUPLE_ENUM. However if one wishes
|
||||||
use this variadic data reliably as arguments to other macros, one needs
|
to use this variadic data reliably as arguments to other macros,
|
||||||
variadic macro support.<br>
|
one needs variadic macro support.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>C++20 Support For Variadic Macros</h4>
|
<h4><a name="C20_Support_For_Variadic_Macros"></a>C++20 Support For
|
||||||
<div>
|
Variadic Macros</h4>
|
||||||
In the C++20 specification there is a new construct which can be
|
<div> In the C++20 specification there is a new construct which can
|
||||||
used in the expansion of a variadic macro, called __VA_OPT__. This
|
be used in the expansion of a variadic macro, called __VA_OPT__.
|
||||||
construct when used in the expansion of a variadic macro is followed
|
This construct when used in the expansion of a variadic macro is
|
||||||
by an opening paranthesis ('('), preprocessor data, and a closing
|
followed by an opening paranthesis '(', preprocessor data, and a
|
||||||
parenthesis ('}'). When the variadic data passed by the invocation
|
closing parenthesis ')'. When the variadic data passed by the
|
||||||
of a variadic macro is empty, this new construct expands to nothing.
|
invocation of a variadic macro is empty, this new construct
|
||||||
When the variadic data passed by the invocation of a variadic macro
|
expands to nothing. When the variadic data passed by the
|
||||||
is not empty, this new construct expands to the preprocessor data
|
invocation of a variadic macro is not empty, this new construct
|
||||||
between its opening and closing parentheses.
|
expands to the preprocessor data between its opening and closing
|
||||||
<br><br>
|
parentheses. <br>
|
||||||
This library offers support for this new C++20 construct by automatically
|
|
||||||
detecting whether this new construct is supported by the compiler's
|
|
||||||
preprocessor when using the library. The library macro which detects
|
|
||||||
support for the __VA_OPT__ construct is called BOOST_PP_VARIADIC_HAS_OPT.
|
|
||||||
This is a function-like macro which takes no parameters and returns
|
|
||||||
1 if the compiler is working in C++20 mode and supports the __VA_OPT__
|
|
||||||
construct, while otherwise it returns 0.
|
|
||||||
<br>
|
<br>
|
||||||
|
This library offers support for this new C++20 construct by
|
||||||
|
automatically detecting whether this new construct is supported by
|
||||||
|
the compiler's preprocessor when using the library. The library
|
||||||
|
macro which detects support for the __VA_OPT__ construct is called
|
||||||
|
BOOST_PP_VARIADIC_HAS_OPT. This is a function-like macro which
|
||||||
|
takes no parameters and returns 1 if the compiler is working in
|
||||||
|
C++20 mode and supports the __VA_OPT__ construct, while otherwise
|
||||||
|
it returns 0. <br>
|
||||||
|
<br>
|
||||||
|
When the __VA_OPT__ construct is supported in C++20 mode the
|
||||||
|
variadic data passed to the variadic macros and to
|
||||||
|
BOOST_PP_OVERLOAD can be empty, otherwise when not in this mode
|
||||||
|
variadic data passed to the variadic macros should never be empty.
|
||||||
|
In this C+++20 mode invoking BOOST_PP_VARIADIC_SIZE with empty
|
||||||
|
data expands to 0, invoking BOOST_PP_VARIADIC_TO_ARRAY with empty
|
||||||
|
data expands to the empty array '(0,())', invoking
|
||||||
|
BOOST_PP_VARIADIC_TO_LIST with empty data expands to the empty
|
||||||
|
list 'BOOST_PP_NIL', and invoking BOOST_PP_OVERLOAD with empty
|
||||||
|
data creates an overload name with 0 appended. Similarly in this
|
||||||
|
C++20 mode passing an empty array '(0,())' to BOOST_PP_ARRAY_ENUM
|
||||||
|
expands to empty variadic data and passing an empty list
|
||||||
|
'BOOST_PP_NIL' to BOOST_PP_LIST_ENUM also expands to empty
|
||||||
|
variadic data. Neither a seq or a tuple can be empty so passing
|
||||||
|
empty variadic data to either BOOST_PP_VARIADIC_TO_SEQ or
|
||||||
|
BOOST_PP_VARIADIC_TO_TUPLE is erroneous. Likewise passing empty
|
||||||
|
data to BOOST_PP_VARIADIC_ELEM is always erroneous since there are
|
||||||
|
no tokens of variadic data to access.<br>
|
||||||
</div>
|
</div>
|
||||||
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
||||||
</u>
|
</u>
|
||||||
<div>An array as a preprocessor data type is a two-element tuple where the
|
<div>An array as a preprocessor data type is a two-element tuple
|
||||||
first element is the array size and the second element is a tuple which
|
where the first element is the array size and the second element
|
||||||
constitutes the array data. Because a tuple knows its own size when the
|
is a tuple which constitutes the array data. Because a tuple knows
|
||||||
compiler supports variadic macros, there is no reason to use the array preprocessor
|
its own size when the compiler supports variadic macros, there is
|
||||||
data type as opposed to the tuple preprocessor data type; the tuple data
|
no reason to use the array preprocessor data type as opposed to
|
||||||
type now has all of the functionality which the array data type has and is
|
the tuple preprocessor data type; the tuple data type now has all
|
||||||
syntactically easier to use. With variadic macro support, which is now
|
of the functionality which the array data type has and is
|
||||||
officially part of the latest C++ standard, the preprocessor array data
|
syntactically easier to use. With variadic macro support, which is
|
||||||
type is essentially obsolete for conforming C++ compilers. Only if your
|
now officially part of the latest C++ standard, the preprocessor
|
||||||
compiler does not support variadic macros is the preprocessor array data
|
array data type is essentially obsolete for conforming C++
|
||||||
type still useful.</div>
|
compilers. Only if your compiler does not support variadic macros
|
||||||
<u style="font-weight: bold;">Using Variadic Data</u>
|
is the preprocessor array data type still useful.</div>
|
||||||
<div>Variadic data exists in the
|
<u style="font-weight: bold;">Using Variadic Data</u>
|
||||||
form of comma-separated preprocessor tokens. This is the case whether
|
<div>Variadic data exists in the form of comma-separated
|
||||||
the variadic data comes from the __VA_ARGS__ of a variadic macro, from
|
preprocessor tokens. This is the case whether the variadic data
|
||||||
the conversion of a library's data type to variadic data, or the
|
comes from the __VA_ARGS__ of a variadic macro, from the
|
||||||
|
conversion of a library's data type to variadic data, or the
|
||||||
manual construction of comma-separated preprocessing tokens by the
|
manual construction of comma-separated preprocessing tokens by the
|
||||||
programmer writing a macro.<br>
|
programmer writing a macro.<br>
|
||||||
<br>
|
<br>
|
||||||
The easiest way to work with
|
The easiest way to work with variadic data internally is to
|
||||||
variadic data internally is to convert it to a library data type.
|
convert it to a library data type. Library data types, whether an
|
||||||
Library data types, whether an <i>array</i>, <i>list</i>,
|
<i>array</i>, <i>list</i>, <i>sequence</i>, or <i>tuple</i>,
|
||||||
<i>sequence</i>,
|
have a rich set of functionality for manipulating data whereas
|
||||||
or <i>tuple</i>, have a rich set of functionality for
|
variadic data functionality in the library only allows one to
|
||||||
manipulating
|
access the variadic data as a whole or to access a single token of
|
||||||
data whereas
|
the variadic data at a time.<br>
|
||||||
variadic data functionality in the library only allows one to access
|
|
||||||
the variadic data as a whole or to access a single token of the
|
|
||||||
variadic data at a time.<br>
|
|
||||||
<br>
|
<br>
|
||||||
The user of the library still may
|
The user of the library still may choose to pass variadic data
|
||||||
choose to pass variadic data back into internal macros rather than
|
back into internal macros rather than convert it to other library
|
||||||
convert it to other library data types. There is no problem passing
|
data types. There is no problem passing variadic data as a whole
|
||||||
variadic data as a whole to variadic macros as the last parameter of
|
to variadic macros as the last parameter of the macro. However: <br>
|
||||||
the macro. However: <br>
|
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold;">Attempting to pass
|
<span style="font-weight: bold;">Attempting to pass variadic data
|
||||||
variadic data as a
|
as a whole directly into a non-variadic macro is not guaranteed
|
||||||
whole directly into a non-variadic macro is not guaranteed to work and
|
to work and may fail.<br>
|
||||||
may fail.<br>
|
|
||||||
</span><br>
|
</span><br>
|
||||||
This occurs because of a preprocessor weakness in a number
|
This occurs because of a preprocessor weakness in a number of
|
||||||
of compilers, currently most notably Visual C++. Even passing variadic
|
compilers, currently most notably Visual C++. Even passing
|
||||||
data as arguments to a non-variadic macro, when it is not represented
|
variadic data as arguments to a non-variadic macro, when it is not
|
||||||
in
|
represented in the form of __VA_ARGS__, may fail with
|
||||||
the form of<6F> __VA_ARGS__, may fail with certain compilers.<br>
|
certain compilers.<br>
|
||||||
<br>
|
<br>
|
||||||
What follows are very simple examples, showing how variadic data can be
|
What follows are very simple examples, showing how variadic data
|
||||||
passed to a non-variadic macro.<br>
|
can be passed to a non-variadic macro.<br>
|
||||||
<br>
|
<br>
|
||||||
First an example of what NOT to do.<br>
|
First an example of what NOT to do.<br>
|
||||||
</div>
|
</div>
|
||||||
<h4>Example<u> - Passing variadic data as a whole to a
|
<h4>Example<u> - Passing variadic data as a whole to a non-variadic
|
||||||
non-variadic
|
|
||||||
macro. DO NOT DO.</u></h4>
|
macro. DO NOT DO.</u></h4>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following should not be done and is not guaranteed to work with compilers. */<br><br><span
|
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following should not be done and is not guaranteed to work with compilers. */<br><br><span style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
||||||
style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
|
||||||
</div>
|
</div>
|
||||||
<div> There are two ways to pass variadic data to a non-variadic
|
<div> There are two ways to pass variadic data to a non-variadic
|
||||||
macro.
|
macro. The first of these is to pass the individual tokens of the
|
||||||
The
|
variadic data separately to the non-variadic macro using the
|
||||||
first of these is to pass the individual tokens of the variadic data
|
BOOST_PP_VARIADIC_ELEM macro in the library.<br>
|
||||||
separately to the non-variadic macro using the BOOST_PP_VARIADIC_ELEM
|
|
||||||
macro in the library.<br>
|
|
||||||
</div>
|
</div>
|
||||||
<h4>Example<u> - Passing individual variadic data tokens to
|
<h4>Example<u> - Passing individual variadic data tokens to a
|
||||||
a
|
|
||||||
non-variadic macro.<br>
|
non-variadic macro.<br>
|
||||||
</u></h4>
|
</u></h4>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = MACRO_ARG_2<br> (<br> BOOST_PP_VARIADIC_ELEM(0,VAR_MACRO(2,3)),<br> BOOST_PP_VARIADIC_ELEM(1,VAR_MACRO(2,3))<br> );</pre>
|
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = MACRO_ARG_2<br> (<br> BOOST_PP_VARIADIC_ELEM(0,VAR_MACRO(2,3)),<br> BOOST_PP_VARIADIC_ELEM(1,VAR_MACRO(2,3))<br> );</pre>
|
||||||
</div>
|
</div>
|
||||||
<div>The second way is to use a macro in the library called
|
<div>The second way is to use a macro in the library called
|
||||||
BOOST_PP_OVERLOAD.
|
BOOST_PP_OVERLOAD. This macro allows one to "overload" a variadic
|
||||||
This macro allows one to "overload" a variadic macro to non-variadic
|
macro to non-variadic macros of different numbers of parameters,
|
||||||
macros of different numbers of parameters, using a common prefix.
|
using a common prefix. </div>
|
||||||
</div>
|
|
||||||
<h4>Example<u> - Passing variadic data as a whole to
|
<h4>Example<u> - Passing variadic data as a whole to
|
||||||
BOOST_PP_OVERLOAD
|
BOOST_PP_OVERLOAD and on to a non-variadic macro.<br>
|
||||||
and on to a non-variadic macro.<br>
|
|
||||||
</u></h4>
|
</u></h4>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3));<br><br>/* For Visual C++ it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
|
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3));<br><br>/* For Visual C++ it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div>Although these techniques will work when passing variadic
|
<div>Although these techniques will work when passing variadic data
|
||||||
data to
|
to non-variadic macros, it is much better and less problematical
|
||||||
non-variadic macros, it is much better and less problematical to
|
to work internally with the existing library data types and to
|
||||||
work internally with the existing library data types and to only use
|
only use variadic macros as an interface for end-users when there
|
||||||
variadic
|
is a need to have a macro which takes a variable number of
|
||||||
macros as an interface for end-users when there is a need to have a
|
parameters.<br>
|
||||||
macro which takes a
|
|
||||||
variable number of parameters.<br>
|
|
||||||
</div>
|
</div>
|
||||||
<b>See</b> <b>Also</b><br>
|
<b>See</b> <b>Also</b><br>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
||||||
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="../headers/variadic.html">Variadic
|
<li><a href="../headers/variadic.html">Variadic Macros<br>
|
||||||
Macros<br>
|
|
||||||
</a></li>
|
</a></li>
|
||||||
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
||||||
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
||||||
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
||||||
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
||||||
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr size="1">
|
<hr size="1">
|
||||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener
|
||||||
Edward Diener
|
|
||||||
2011,2013,2016</i> </div>
|
2011,2013,2016</i> </div>
|
||||||
<div style="margin-left: 0px;">
|
<div style="margin-left: 0px;">
|
||||||
<p><small>Distributed under the Boost Software License,
|
<p><small>Distributed under the Boost Software License, Version
|
||||||
Version 1.0.
|
1.0. (See accompanying file <a
|
||||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -15,11 +15,27 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
|
# include <boost/preprocessor/array/size.hpp>
|
||||||
# include <boost/preprocessor/tuple/rem.hpp>
|
# include <boost/preprocessor/tuple/rem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_ARRAY_ENUM */
|
# /* BOOST_PP_ARRAY_ENUM */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||||
|
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_ARRAY_ENUM_I(array)
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_I(array) BOOST_PP_TUPLE_REM_CTOR ## array
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_TUPLE_REM_CTOR array
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_ARRAY_ENUM_EMPTY(array)
|
||||||
|
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_IF(BOOST_PP_ARRAY_SIZE(array),BOOST_PP_ARRAY_ENUM_NOT_EMPTY,BOOST_PP_ARRAY_ENUM_EMPTY)(array)
|
||||||
|
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||||
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
|
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
|
||||||
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
||||||
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
|
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||||
|
@ -15,12 +15,24 @@
|
|||||||
# define BOOST_PREPROCESSOR_LIST_ENUM_HPP
|
# define BOOST_PREPROCESSOR_LIST_ENUM_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
|
# include <boost/preprocessor/list/adt.hpp>
|
||||||
# include <boost/preprocessor/list/for_each_i.hpp>
|
# include <boost/preprocessor/list/for_each_i.hpp>
|
||||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_LIST_ENUM */
|
# /* BOOST_PP_LIST_ENUM */
|
||||||
#
|
#
|
||||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
|
# define BOOST_PP_LIST_ENUM_NOT_EMPTY(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_LIST_ENUM_NOT_EMPTY(list) BOOST_PP_LIST_ENUM_I(list)
|
||||||
|
# define BOOST_PP_LIST_ENUM_I(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_LIST_ENUM_EMPTY(list)
|
||||||
|
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_IIF(BOOST_PP_LIST_IS_NIL(list),BOOST_PP_LIST_ENUM_EMPTY,BOOST_PP_LIST_ENUM_NOT_EMPTY)(list)
|
||||||
|
# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list)
|
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list)
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_REVERSE */
|
# /* BOOST_PP_TUPLE_REVERSE */
|
||||||
#
|
#
|
||||||
@ -31,7 +33,12 @@
|
|||||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_TUPLE_REVERSE_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple,tuple)
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,10 +15,19 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# if BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_TUPLE_SIZE_CHECK(BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,))
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_TUPLE_SIZE_CHECK(BOOST_PP_VARIADIC_SIZE tuple)
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_TUPLE_SIZE_CHECK(size) BOOST_PP_IF(size,size,1)
|
||||||
|
# elif BOOST_PP_VARIADICS_MSVC
|
||||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,)
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
||||||
#
|
#
|
||||||
@ -29,7 +31,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) BOOST_PP_TUPLE_TO_ARRAY_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# define BOOST_PP_TUPLE_TO_ARRAY_1_SIZE(size,tuple) (BOOST_PP_IF(size,size,1), tuple)
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_LIST */
|
# /* BOOST_PP_TUPLE_TO_LIST */
|
||||||
#
|
#
|
||||||
@ -31,7 +33,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_TUPLE_TO_LIST_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_SEQ */
|
# /* BOOST_PP_TUPLE_TO_SEQ */
|
||||||
#
|
#
|
||||||
@ -29,7 +31,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_TUPLE_TO_SEQ_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,14 +15,24 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
|
# include <boost/preprocessor/facilities/check_empty.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADIC_SIZE */
|
# /* BOOST_PP_VARIADIC_SIZE */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
# if BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_NOT_EMPTY(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_NOT_EMPTY(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_EMPTY(...) 0
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_IIF(BOOST_PP_CHECK_EMPTY(__VA_ARGS__),BOOST_PP_VARIADIC_SIZE_EMPTY,BOOST_PP_VARIADIC_SIZE_NOT_EMPTY)(__VA_ARGS__)
|
||||||
|
# elif BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size
|
# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size
|
||||||
# endif
|
# endif
|
||||||
|
@ -14,15 +14,23 @@
|
|||||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP
|
# define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# endif
|
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADIC_TO_ARRAY */
|
# /* BOOST_PP_VARIADIC_TO_ARRAY */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# if BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_VARIADIC_TO_ARRAY_EMPTY(...) (0,())
|
||||||
|
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_IF(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY,BOOST_PP_VARIADIC_TO_ARRAY_EMPTY)(__VA_ARGS__)
|
||||||
|
# elif BOOST_PP_VARIADICS_MSVC
|
||||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
||||||
|
@ -14,12 +14,21 @@
|
|||||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP
|
# define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADIC_TO_LIST */
|
# /* BOOST_PP_VARIADIC_TO_LIST */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_VARIADIC_TO_LIST_NOT_EMPTY(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
||||||
|
# define BOOST_PP_VARIADIC_TO_LIST_EMPTY(...) BOOST_PP_NIL
|
||||||
|
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_IF(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),BOOST_PP_VARIADIC_TO_LIST_NOT_EMPTY,BOOST_PP_VARIADIC_TO_LIST_EMPTY)(__VA_ARGS__)
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define ARRAY_EMPTY (0, ())
|
# define ARRAY_EMPTY (0, ())
|
||||||
@ -66,10 +67,19 @@ 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_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(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((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
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 1 END
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
// to_list
|
// to_list
|
||||||
|
|
||||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
||||||
@ -184,7 +194,10 @@ BEGIN BOOST_PP_ARRAY_ELEM(28, BOOST_PP_ARRAY_REPLACE(ARRAY_VERY_LARGE, 28, 1)) =
|
|||||||
// reverse
|
// reverse
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 64 END
|
||||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY_ONE))) == 1 END
|
|
||||||
|
// BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY_ONE))) == 1 END
|
||||||
|
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, ARRAY_ONE)) == 1 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY)) == 2 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(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_ELEM(38, BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 25 END
|
||||||
|
10
test/seq.cxx
10
test/seq.cxx
@ -29,6 +29,7 @@
|
|||||||
# include <boost/preprocessor/list/size.hpp>
|
# include <boost/preprocessor/list/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
|
|
||||||
# define SEQ_NONE ()
|
# define SEQ_NONE ()
|
||||||
@ -215,7 +216,16 @@ BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_SEQ_TO_LIST(SEQ_NONE)) == 1 END
|
|||||||
|
|
||||||
#if BOOST_PP_VARIADICS
|
#if BOOST_PP_VARIADICS
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(0,BOOST_PP_SEQ_ENUM(SEQ)) == 4 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(0,BOOST_PP_SEQ_ENUM(SEQ)) == 4 END
|
||||||
BEGIN BOOST_PP_TUPLE_ELEM(2,BOOST_PP_SEQ_ELEM(0,BOOST_PP_VARIADIC_SEQ_TO_SEQ(SEQVAR))) == 8 END
|
BEGIN BOOST_PP_TUPLE_ELEM(2,BOOST_PP_SEQ_ELEM(0,BOOST_PP_VARIADIC_SEQ_TO_SEQ(SEQVAR))) == 8 END
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# endif
|
# endif
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
|
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
|
||||||
@ -131,7 +132,16 @@ BEGIN BOOST_PP_VARIADIC_ELEM(45,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE
|
|||||||
|
|
||||||
// enum
|
// enum
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
||||||
@ -189,7 +199,16 @@ BEGIN BOOST_PP_TUPLE_ELEM(33, BOOST_PP_TUPLE_PUSH_FRONT(TUPLE_LARGE, 33)) == 32
|
|||||||
|
|
||||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||||
|
|
||||||
@ -209,7 +228,16 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
|||||||
|
|
||||||
// rem_ctor
|
// rem_ctor
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
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_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE)) == 6 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_LARGE)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_VERY_LARGE)) == 64 END
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||||
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
||||||
|
|
||||||
|
#if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
#define VDATA_EMPTY
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
||||||
@ -36,6 +42,14 @@ BEGIN BOOST_PP_VARIADIC_SIZE(7,11,3,8,14,85,56,92,165) == 9 END
|
|||||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
||||||
|
|
||||||
|
#if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_EMPTY) == 0 END
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE() == 0 END
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
||||||
|
Reference in New Issue
Block a user