Assume variadic macro support.

This commit is contained in:
Edward Diener
2020-09-17 18:25:36 -04:00
parent 8288ce7575
commit 5fd12d32d4
80 changed files with 864 additions and 9334 deletions
+2 -4
View File
@@ -24,11 +24,9 @@
0 size. The notation for an empty array is '(0,())'.<br>
<br>
<span style="font-style: italic;"> </span></div>
<div>With variadic macro support a <i>tuple </i>has all of the
<div>A <i>tuple </i>has all of the
functionality as an <i>array</i>, knows its own size, and is easier
syntactically to use. Because of that an <i>array</i> should be used, as
opposed to a <i>tuple</i>, only if your compiler does not support
variadic macros. The only advantage an <i>array </i>has over a <i>tuple
syntactically to use. The only advantage an <i>array </i>has over a <i>tuple
</i>is that an <i>array </i>can be empty while a <i>tuple </i>always
has at least one element and therefore can never have a size of 0.<br>
<br>
+2 -4
View File
@@ -15,10 +15,8 @@
A <i>tuple </i>cannot be empty. The notation '()' as a <i>tuple </i>is
a single element <i>tuple </i>of size 1, where the element is empty. </div>
<div> <i>Tuples</i> are fast and easy to use.&nbsp; With variadic macro
support it is not necessary to know the size of a <i>tuple; </i>without
variadic macro support&nbsp;all access to <i>tuples</i> requires
knowledge of its size. Use a <i>tuple </i>instead of an <i>array</i> if
your compiler supports variadic macros, since a <i>tuple </i>has all of
support it is not necessary to know the size of a <i>tuple</i>.
Use a <i>tuple </i>instead of an <i>array</i>, since a <i>tuple </i>has all of
the functionality as an <i>array </i>and is easier syntactically to use.
The only functionality an <i>array </i>has which a <i>tuple </i>does
not have is that an <i>array </i>can be empty whereas a <i>tuple </i>cannot
+7 -10
View File
@@ -8,26 +8,23 @@
</head>
<body>
<div style="margin-left: 0px;"> The <b>config/config.hpp</b>
header defines internal configuration macros as well as macros for
determining variadic macro support and for determining whether the
compiler's preprocessor conforms to the standard. The file
is automatically included whenever any Boost PP macros are used.
The end-user can manually
include it in order to use the BOOST_PP_VARIADICS macro or the
BOOST_PP_IS_STANDARD macro, but normally should never have to do
so.</div>
header defines internal configuration macros as well as a macro
for determining whether the compiler's preprocessor conforms to
the standard. The file is automatically included whenever any
Boost PP macros are used.The end-user can manually include it
in order to use the BOOST_PP_IS_STANDARD macro, but normally
should never have to do so.</div>
<h4> Usage </h4>
<div class="code"> #include <b>&lt;boost/preprocessor/config/config.hpp&gt;</b>
</div>
<h4> Contents </h4>
<ul>
<li><a href="../../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
<li><a href="../../ref/is_standard.html">BOOST_PP_IS_STANDARD</a><br>
</li>
</ul>
<hr size="1">
<div style="margin-left: 0px;"><i>© Copyright Edward Diener
2011,2014</i> </div>
2011,2014,2020</i> </div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
+1 -1
View File
@@ -49,7 +49,7 @@ href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>&gt;<br>#include &lt;<a href="../headers/cat.html">boost/preprocessor/cat.hpp</a>&gt;<br>#include &lt;<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>&gt;<br>#include &lt;<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>&gt;<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>
<pre>#include &lt;<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>&gt;<br>#include &lt;<a href="../headers/cat.html">boost/preprocessor/cat.hpp</a>&gt;<br>#include &lt;<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>&gt;<br>#include &lt;<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>&gt;<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++'s default preprocessor<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>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener
+58 -52
View File
@@ -1,58 +1,64 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_EAT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_EAT</b> macro expands to a macro that eats a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_EAT</b>(<i>size</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_EAT</b>(<i>size</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><b></b><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> to be eaten.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i> in the non-variadic version. <br>
<br>For the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>&nbsp;the
size may be left out
completely so that the macro can be invoked as BOOST_PP_TUPLE_EAT(); you may get a warning from some compilers, but the
functionality will still work. If you specify a size in the variadic
version, it will be ignored, but the warning from some compilers will
not occur.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/eat.html">&lt;boost/preprocessor/tuple/eat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>&gt;<br>#include &lt;<a href="../headers/tuple/eat.html">boost/preprocessor/tuple/eat.hpp</a>&gt;<br><br>#define OP(a, b) (a b)<br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>(2))(1, 2)<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>())(1, 2)<br><br>MACRO(0) // expands to nothing<br>MACRO(1) // expands to (1, 2)<br></pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_EAT</b> macro
expands to a macro that eats a <i>tuple</i>. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_EAT</b>() <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_EAT</b>(<i>size</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><b></b><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> to be eaten.&nbsp; The argument
is ignored.<br>
</dd>
</dl>
<h4>Remarks</h4>
<div>The
size may be left out
completely so that the macro can be invoked as
BOOST_PP_TUPLE_EAT(); you may get a warning from some compilers,
but the
functionality will still work. If you specify a size, it will be
ignored, but the warning from some compilers will
not occur.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/eat.html">&lt;boost/preprocessor/tuple/eat.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>&gt;<br>#include &lt;<a href="../headers/tuple/eat.html">boost/preprocessor/tuple/eat.hpp</a>&gt;<br><br>#define OP(a, b) (a b)<br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>())(1, 2)<br><br>MACRO(0) // expands to nothing<br>MACRO(1) // expands to (1, 2)<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+58 -59
View File
@@ -1,65 +1,64 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_ELEM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_ELEM</b> macro extracts an element from a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_ELEM</b>(<i>size</i>, <i>i</i>, <i>tuple</i>)<sup></sup><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_ELEM</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><b></b><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i>.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
<dt>i</dt>
<dd>
The zero-based index into the <i>tuple</i> of the element to be extracted.&nbsp;
Valid values range from <i>0</i> to <i>size</i> - <i>1</i>.
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> from which an element is to be extracted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i>,
and <i>i</i> must be less than the size of the <i>tuple</i>. <br>
<br>You can
invoke the variadic version as BOOST_PP_TUPLE_ELEM(<i>i</i>,<i>tuple</i>) or
BOOST_PP_TUPLE_ELEM(<i>size</i>,<i>i</i>,<i>tuple</i>).
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/elem.html">&lt;boost/preprocessor/tuple/elem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/elem.hpp</a>&gt;<br><br>#define TUPLE (a, b, c, d)<br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, TUPLE) // expands to a<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 3, TUPLE) // expands to d<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(0, TUPLE) // expands to a in the variadic version<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, TUPLE) // expands to d in the variadic version<br></pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_ELEM</b>
macro extracts an element from a <i>tuple</i>. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_ELEM</b>(<i>i</i>, <i>tuple</i>)
<a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_ELEM</b>(<i>size</i>, <i>i</i>, <i>tuple</i>)
<a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i>.&nbsp; The size is ignored.<br>
</dd>
<dt>i</dt>
<dd> The zero-based index into the <i>tuple</i> of the element to
be extracted.&nbsp; Valid values range from <i>0</i> to <i>size</i>
- <i>1</i>. </dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> from which an element is to be extracted. </dd>
</dl>
<h4>Remarks</h4>
<div>You can invoke the variadic macro as BOOST_PP_TUPLE_ELEM(<i>i</i>,<i>tuple</i>),
or BOOST_PP_TUPLE_ELEM(<i>size</i>,<i>i</i>,<i>tuple</i>) for
backward compatibility. </div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/elem.html">&lt;boost/preprocessor/tuple/elem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/elem.hpp</a>&gt;<br><br>#define TUPLE (a, b, c, d)<br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(0, TUPLE) // expands to a in the variadic version<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, TUPLE) // expands to d in the variadic version<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+61 -48
View File
@@ -1,55 +1,68 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_ENUM</b> macro&nbsp;converts a <i>tuple</i> to its comma-separated elements. The comma-separated elements are in the form of <i>variadic data</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_ENUM</b>(<i>size,tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_ENUM</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><b></b><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i>.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>. <br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> whose elements are to be converted. </dd>
</dl>
<h4> Remarks </h4>
<div>
<br>You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_ENUM(<i>tuple</i>) or
BOOST_PP_TUPLE_ENUM(<i>size</i>,<i>tuple</i>).<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a><br>
</li>
</ul>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/enum.html">&lt;boost/preprocessor/tuple/enum.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/enum.html">boost/preprocessor/tuple/enum.hpp</a>&gt;<br><br>#define TUPLE (B,O,O,S,T)<br><br><a href="tuple_enum.html">BOOST_PP_TUPLE_ENUM</a>(5,TUPLE) // expands to B, O, O, S, T<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_enum.html">BOOST_PP_TUPLE_ENUM</a>(TUPLE) // expands to B, O, O, S, T<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_ENUM</b>
macro&nbsp;converts a <i>tuple</i> to its comma-separated
elements. The comma-separated elements are in the form of <i>variadic
data</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_ENUM</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_ENUM</b>(<i>size,tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i>.&nbsp; The size is ignored.<br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> whose elements are to be converted. </dd>
</dl>
<h4> Remarks </h4>
<div>
You can
invoke the variadic macro <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_ENUM(<i>tuple</i>) or
BOOST_PP_TUPLE_ENUM(<i>size</i>,<i>tuple</i>) for backward
compatibility.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a><br>
</li>
</ul>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/enum.html">&lt;boost/preprocessor/tuple/enum.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/enum.html">boost/preprocessor/tuple/enum.hpp</a>&gt;<br><br>#define TUPLE (B,O,O,S,T)<br><br><a href="tuple_enum.html">BOOST_PP_TUPLE_ENUM</a>(TUPLE) // expands to B, O, O, S, T<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i>
<br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0.
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+22 -17
View File
@@ -1,33 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<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_TUPLE_INSERT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT</b> macro
inserts an element into an <i>tuple</i>.</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT</b>
macro inserts an element into an <i>tuple</i>.</div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_INSERT</b>(<i>tuple</i>, <i>i</i>, <i>elem</i>)
<a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
<div class="code"> <b>BOOST_PP_TUPLE_INSERT</b>(<i>tuple</i>, <i>i</i>,
<i>elem</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
<h4>Arguments</h4>
<dl>
<dt>tuple</dt>
<dd> The <i>tuple</i> into which an element is to be inserted. </dd>
<dt>i</dt>
<dd> The zero-based position in <i>tuple</i> where an element is to be
inserted.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
<dd> The zero-based position in <i>tuple</i> where an element is
to be inserted.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
<dt>elem</dt>
<dd> The element to insert. </dd>
</dl>
<h4>Remarks</h4>
<div> This macro inserts <i>elem</i> before the element at index <i>i</i>.
</div>
<div> If the operation attempts to create an <i>tuple</i> that is larger
than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
<div> This macro uses <b>BOOST_PP_WHILE</b> interally.&nbsp; Therefore, to
use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
see <b>BOOST_PP_TUPLE_INSERT_D</b>.</div>
<div> If the operation attempts to create an <i>tuple</i> that is
larger than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
<div> This macro uses <b>BOOST_PP_WHILE</b> interally.&nbsp;
Therefore, to use the <i>d</i> parameter passed from other macros
that use <b>BOOST_PP_WHILE</b>, see <b>BOOST_PP_TUPLE_INSERT_D</b>.</div>
<h4>See Also</h4>
<ul>
<li><a href="tuple_insert_d.html">BOOST_PP_TUPLE_INSERT_D</a></li>
@@ -42,13 +44,16 @@
#define TUPLE (a, b, d)
<a href="tuple_insert.html">BOOST_PP_TUPLE_INSERT</a>(TUPLE, 2, c) // expands to (a, b, c, d)
</pre></div>
</pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i> </div>
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
<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>
+16 -12
View File
@@ -1,16 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<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_TUPLE_INSERT_D</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT_D</b> macro
inserts an element into a <i>tuple</i>.&nbsp; It reenters <b>BOOST_PP_WHILE</b>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT_D</b>
macro inserts an element into a <i>tuple</i>.&nbsp; It reenters <b>BOOST_PP_WHILE</b>
with maximum efficiency.</div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_INSERT_D</b>(<i>d</i>, <i>tuple</i>,
<i>i</i>, <i>elem</i>) <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
<i>i</i>, <i>elem</i>)</div>
<h4>Arguments</h4>
<dl>
<dt>d</dt>
@@ -18,16 +20,16 @@
<dt>tuple</dt>
<dd> The <i>tuple</i> into which an element is to be inserted.</dd>
<dt>i</dt>
<dd> The zero-based position in <i>tuple</i> where an element is to be
inserted.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
<dd> The zero-based position in <i>tuple</i> where an element is
to be inserted.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
<dt>elem</dt>
<dd> The element to insert. </dd>
</dl>
<h4>Remarks</h4>
<div> This macro inserts <i>elem</i> before the element at index <i>i</i>.
</div>
<div> If the operation attempts to create an <i>tuple</i> that is larger
than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
<div> If the operation attempts to create an <i>tuple</i> that is
larger than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
<h4>See Also</h4>
<ul>
<li><a href="tuple_insert.html">BOOST_PP_TUPLE_INSERT</a></li>
@@ -36,11 +38,13 @@
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/insert.html">&lt;boost/preprocessor/tuple/insert.hpp&gt;</a>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i> </div>
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
<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>
+63 -54
View File
@@ -1,60 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_REM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_REM</b> macro expands to a macro that removes the parentheses from a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_REM</b>(<i>size</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REM</b>(<i>size</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> from which the parentheses are to be removed.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i> in the non-variadic version.<br>
<br>
For the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>&nbsp;the
size may be left out
completely so that the macro can be invoked as BOOST_PP_TUPLE_REM(); you may get a warning from some compilers, but the
functionality will still work. If you specify a size in the variadic
version, it will be ignored, but the warning from some compilers will
not occur.<br>
<br>Note: For Visual C++ 8.0 ( Visual Studio 2005 ) you must specify the correct <i>size</i> argument as in the non-variadic version.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/rem.html">&lt;boost/preprocessor/tuple/rem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/rem.hpp</a>&gt;<br><br><a href="tuple_rem.html">BOOST_PP_TUPLE_REM</a>(3)(x, y, z) // expands to x, y, z<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_rem.html">BOOST_PP_TUPLE_REM</a>()(x, y, z) // expands to x, y, z<br></pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REM</b> macro
expands to a macro that removes the parentheses from a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_REM</b>() <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REM</b>(<i>size</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> from which the parentheses are
to be removed.&nbsp; This argument is ignored.<br>
</dd>
</dl>
<h4>Remarks</h4>
<div>The
size may be left out
completely so that the macro can be invoked as
BOOST_PP_TUPLE_REM(); you may get a warning from some compilers,
but the
functionality will still work. If you specify a size, it will be
ignored, but the warning from some compilers will
not occur.<br>
<br>
Note: For Visual C++ 8.0 ( Visual Studio 2005 ) you must specify
the correct <i>size</i> argument as a non-variadic version must
be used.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/rem.html">&lt;boost/preprocessor/tuple/rem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/rem.hpp</a>&gt;<br><br><a href="tuple_rem.html">BOOST_PP_TUPLE_REM</a>()(x, y, z) // expands to x, y, z<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+58 -55
View File
@@ -1,61 +1,64 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_REM_CTOR</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_REM_CTOR</b> macro removes the parentheses from a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_REM_CTOR</b>(<i>size</i>, <i>tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REM_CTOR</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> from which the parentheses are to be removed.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> from which the parenthesis are removed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of <i>tuple</i>.<br>
<br>
You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_REM_CTOR(<i>tuple</i>) or
BOOST_PP_TUPLE_REM_CTOR(<i>size</i>,<i>tuple</i>).<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/rem.html">&lt;boost/preprocessor/tuple/rem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/rem.hpp</a>&gt;<br><br><a href="tuple_rem_ctor.html">BOOST_PP_TUPLE_REM_CTOR</a>(3, (x, y, z)) // expands to x, y, z<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_rem_ctor.html">BOOST_PP_TUPLE_REM_CTOR</a>((x, y, z)) // expands to x, y, z<br></pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REM_CTOR</b>
macro removes the parentheses from a <i>tuple</i>. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_REM_CTOR</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REM_CTOR</b>(<i>size</i>, <i>tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> from which the parentheses are
to be removed.&nbsp;&nbsp;This argument is ignored.<br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> from which the parenthesis are removed. </dd>
</dl>
<h4>Remarks</h4>
<div>You can
invoke the variadic macro <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_REM_CTOR(<i>tuple</i>) or
BOOST_PP_TUPLE_REM_CTOR(<i>size</i>,<i>tuple</i>) for backward
compatibility.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/rem.html">&lt;boost/preprocessor/tuple/rem.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/rem.hpp</a>&gt;<br><br><a href="tuple_rem_ctor.html">BOOST_PP_TUPLE_REM_CTOR</a>((x, y, z)) // expands to x, y, z<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+57 -55
View File
@@ -1,61 +1,63 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_REVERSE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_REVERSE</b> macro reverses a <i>tuple</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_REVERSE</b>(<i>size</i>, <i>tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REVERSE</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> to be reversed.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> to be reversed.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i>.<br>
<br>
You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_REVERSE(<i>tuple</i>) or
BOOST_PP_TUPLE_REVERSE(<i>size</i>,<i>tuple</i>).<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/reverse.html">&lt;boost/preprocessor/tuple/reverse.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/tuple/reverse.html">boost/preprocessor/tuple/reverse.hpp</a>&gt;<br><br><a href="tuple_reverse.html">BOOST_PP_TUPLE_REVERSE</a>(3, (x, y, z)) // expands to (z, y, x)<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_reverse.html">BOOST_PP_TUPLE_REVERSE</a>((x, y, z)) // expands to (z, y, x)<br></pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_REVERSE</b>
macro reverses a <i>tuple</i>. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_REVERSE</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_REVERSE</b>(<i>size</i>, <i>tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> to be reversed.&nbsp; The
argument is ignored.<br>
</dd>
<dd> The <i>tuple</i> to be reversed. </dd>
</dl>
<h4>Remarks</h4>
<div>You can
invoke the variadic macro <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_REVERSE(<i>tuple</i>) or
BOOST_PP_TUPLE_REVERSE(<i>size</i>,<i>tuple</i>) for backward
compatibility.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/reverse.html">&lt;boost/preprocessor/tuple/reverse.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/reverse.html">boost/preprocessor/tuple/reverse.hpp</a>&gt;<br><br><a href="tuple_reverse.html">BOOST_PP_TUPLE_REVERSE</a>((x, y, z)) // expands to (z, y, x)<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+52 -45
View File
@@ -1,50 +1,57 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_TUPLE_TO_ARRAY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_TO_ARRAY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_ARRAY</b>
macro
converts a <i>tuple</i> to an <i>array</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>size,tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i>.&nbsp; Valid <i>tuple</i> sizes
range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>. <br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> to be converted.</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i>.<br>
<br>
You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_TO_ARRAY(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_ARRAY(<i>size</i>,<i>tuple</i>).<a href="../headers/seq/to_array.html"></a>
</div>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_array.html">&lt;boost/preprocessor/tuple/to_array.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/to_array.html">boost/preprocessor/tuple/to_array.hpp</a>&gt;<br><br>#define TUPLE (a,b,c)<br><br><a href="tuple_to_array.html">BOOST_PP_TUPLE_TO_ARRAY</a>(3,TUPLE) // expands to (3, (a, b, c))<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_to_array.html">BOOST_PP_TUPLE_TO_ARRAY</a>(TUPLE) // expands to (3, (a, b, c))<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© 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>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_ARRAY</b>
macro
converts a <i>tuple</i> to an <i>array</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_ARRAY</b>(<i>size,tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i>.&nbsp; The argument is ignored.<br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> to be converted.</dd>
</dl>
<h4>Remarks</h4>
<div>You can
invoke the variadic macro <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_TO_ARRAY(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_ARRAY(<i>size</i>,<i>tuple</i>) for backward
compatibility.
</div>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_array.html">&lt;boost/preprocessor/tuple/to_array.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/to_array.html">boost/preprocessor/tuple/to_array.hpp</a>&gt;<br><br>#define TUPLE (a,b,c)<br><br><a href="tuple_to_array.html">BOOST_PP_TUPLE_TO_ARRAY</a>(TUPLE) // expands to (3, (a, b, c))<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener
2011,2013,2020</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>
+58 -54
View File
@@ -1,60 +1,64 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_TO_LIST</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_TUPLE_TO_LIST</b> macro converts a <i>tuple</i> to a <i>list</i>.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_TUPLE_TO_LIST</b>(<i>size</i>, <i>tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_LIST</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> to be converted.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp;
</dd>
<dt>tuple</dt>
<dd>
The <i>tuple</i> to be converted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
The <i>size</i> argument must be the actual size of the <i>tuple</i>.<br>
<br>
You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_TO_LIST(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_LIST(<i>size</i>,<i>tuple</i>).<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/tuple/to_list.html">&lt;boost/preprocessor/tuple/to_list.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>#include &lt;<a href="../headers/tuple/to_list.html">boost/preprocessor/tuple/to_list.hpp</a>&gt;<br><br><a href="tuple_to_list.html">BOOST_PP_TUPLE_TO_LIST</a>(3, (x, y, z))<br> // expands to (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_to_list.html">BOOST_PP_TUPLE_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>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br><i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_LIST</b>
macro converts a <i>tuple</i> to a <i>list</i>. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_TUPLE_TO_LIST</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_LIST</b>(<i>size</i>, <i>tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4>Arguments</h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> to be converted.&nbsp; The
argument is ignored.<br>
</dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> to be converted. </dd>
</dl>
<h4>Remarks</h4>
<div>You can
invoke the variadic maco <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_TO_LIST(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_LIST(<i>size</i>,<i>tuple</i>) for backward
compatibility.<br>
</div>
<h4>See Also</h4>
<ul>
<li><a href="limit_tuple.html">BOOST_PP_LIMIT_TUPLE</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_list.html">&lt;boost/preprocessor/tuple/to_list.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/to_list.html">boost/preprocessor/tuple/to_list.hpp</a>&gt;<br><br><a href="tuple_to_list.html">BOOST_PP_TUPLE_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>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0. (See accompanying file <a
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+54 -44
View File
@@ -1,51 +1,61 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_TUPLE_TO_SEQ</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_SEQ</b> macro
converts a <i>tuple</i> to an <i>seq</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_TO_SEQ</b>(<i>size</i>, <i>tuple</i>)<br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_SEQ</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd>
The size of the <i>tuple</i> to be converted.&nbsp;
Valid <i>tuple</i> sizes range from <i>1</i> to <b>BOOST_PP_LIMIT_TUPLE</b>.&nbsp; </dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> to be converted. </dd>
</dl>
<h4>Remarks</h4>
<div> The <i>size</i> argument must be the actual size of the <i>tuple</i>.<br>
<br>
You can
invoke the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a> as BOOST_PP_TUPLE_TO_SEQ(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_SEQ(<i>size</i>,<i>tuple</i>).<a href="../headers/tuple/to_seq.html"></a>
</div>
<h4>Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_seq.html">&lt;boost/preprocessor/tuple/to_seq.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/to_seq.html">boost/preprocessor/tuple/to_seq.hpp</a>&gt;<br><br><a href="tuple_to_seq.html">BOOST_PP_TUPLE_TO_SEQ</a>(3, (a, b, c)) // expands to (a)(b)(c)<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_to_seq.html">BOOST_PP_TUPLE_TO_SEQ</a>((a, b, c)) // expands to (a)(b)(c)<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
<br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
<div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_TO_SEQ</b>
macro
converts a <i>tuple</i> to an <i>seq</i>. </div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_TUPLE_TO_SEQ</b>(<i>tuple</i>) <a
href="file:///E:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/topics/variadic_macros.html#VNotation"
target="_self"><sup>(v)</sup></a><br>
<br>
or<br>
<br>
<b>BOOST_PP_TUPLE_TO_SEQ</b>(<i>size</i>, <i>tuple</i>) <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
</div>
<h4> Arguments </h4>
<dl>
<dt>size</dt>
<dd> The size of the <i>tuple</i> to be converted. The argument
is ignored. &nbsp; </dd>
<dt>tuple</dt>
<dd> The <i>tuple</i> to be converted. </dd>
</dl>
<h4>Remarks</h4>
<div>You can
invoke the variadic macro <a
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a>
as BOOST_PP_TUPLE_TO_SEQ(<i>tuple</i>) or
BOOST_PP_TUPLE_TO_SEQ(<i>size</i>,<i>tuple</i>) for backward
compatibility.
</div>
<h4>Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/tuple/to_seq.html">&lt;boost/preprocessor/tuple/to_seq.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/tuple/to_seq.html">boost/preprocessor/tuple/to_seq.hpp</a>&gt;<br><br><a href="tuple_to_seq.html">BOOST_PP_TUPLE_TO_SEQ</a>((a, b, c)) // expands to (a)(b)(c)<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i>© Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i>
<br>
<i>© Copyright Paul Mensonides 2002<br>
</i><i>© Copyright Edward Diener 2011,2013,2020</i><br>
</div>
<div style="margin-left: 0px;">
<p><small>Distributed under the Boost Software License, Version
1.0.
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
</div>
</body>
</html>
</html>
+6 -9
View File
@@ -9,18 +9,15 @@
<h4>Usage</h4>
<div class="code"><b>BOOST_PP_VARIADICS</b><br>
</div><b>Remarks</b>
<div> The macro is an <i>object-like</i> macro. It is used in internal
code to check for the presence of variadic macro support. It can be
used by the end-user for the same purpose. The macro equals 1 if
variadic macros are supported and 0 if they are not. </div><b>Requirements</b>
<div> The macro is an <i>object-like</i> macro, but has been deprecated. It was used in internal
code to check for the presence of variadic macro support, but now is no longer used as it is always
assumed that variadic macro support from the compiler is present. The value is always set to 1
for backward compatibility, but no longer used internally in the library.
</div><b>Requirements</b>
<div> <b>Header:</b> &nbsp;<a href="../headers/config/variadics.html">&lt;boost/preprocessor/config/config.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/config/variadics.html">boost/preprocessor/config/config.hpp</a>&gt;<br><br>#if <a href="variadics.html">BOOST_PP_VARIADICS</a><br>#define SOME_MACRO(...) // replacement list<br>#else<br>#define SOME_MACRO(param1,param2) // replacement list<br>#endif<br></pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011,2014</i> </div>
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011,2014,2020</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>
+8 -10
View File
@@ -125,13 +125,12 @@
BOOST_PP_VARIADIC_HAS_OPT, which is a function-like macro taking
no parameters and returning 1 if the __VA_OPT__ construct is
supported and 0 if it is not. The macro only returns 1 when
variadic macros are supported, when the compiler is at the C++20
level, and when the __VA_OPT__ construct can be used according to
the C++20 standard. In particular the macro needs the compiler to
be working at the C++20 level despite the fact that at least one
major compiler supports the __VA_OPT__ construct in some of its
latest releases even when the compiler is being used at a C++
standard level below that of C++20. The reason this Boost
the compiler is at the C++20 level, and when the __VA_OPT__ construct
can be used according to the C++20 standard. In particular the macro
needs the compiler to be working at the C++20 level despite the fact
that at least one major compiler supports the __VA_OPT__ construct in
some of its latest releases even when the compiler is being used at a
C++ standard level below that of C++20. The reason this Boost
preprocessor library requires the C++20 level is because that same
major compiler can produce a warning, or even an error, when it
even sees a macro using the __VA_OPT__ construct at a level below
@@ -139,9 +138,8 @@
requiring strict adherence to the level of the C++ standard being
used are passed on the command line. So taking a conservative
approach the BOOST_PP_VARIADIC_HAS_OPT macros requires compilation
at the C++20 level, along with variadic macro support, along with
the testing code expanding to 1, in order to specify that
__VA_OPT__ is supported.<br>
at the C++20 level, along with the testing code expanding to 1,
in order to specify that __VA_OPT__ is supported.<br>
<br>
The actual Boost Preprocessor library for testing for emptiness in
C++20 mode is called BOOST_PP_CHECK_EMPTY. The macro is a variadic
+2 -2
View File
@@ -364,8 +364,8 @@ typedef TYPELIST((int, double, incomplete&lt;void&gt;)) xyz;
<div>
There are two minor caveats with this result.&nbsp; First, certain types like <code>void</code>
can't be the type of an argument, so they have to be wrapped with <code>incomplete&lt;T&gt;</code>.&nbsp;
Second, the necessary double parenthesis is annoying.&nbsp; If and when C++
gets C99's variadic macros, <code>TYPELIST</code> can be redefined:
Second, the necessary double parenthesis is annoying.&nbsp; With variadic macros,
<code>TYPELIST</code> can be redefined:
</div>
<div class="code">
<pre>
+32 -71
View File
@@ -11,8 +11,8 @@
</head>
<body>
<h4>Variadic Macros</h4>
<div> Variadic macros are supported by a number of compilers. They
are macros of the form: </div>
<div> Variadic macros are supported by nearly all compilers. This library assumes
the compiler supports variadic macros. Variadic macros are macros of the form: </div>
<div class="code">
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__</pre>
</div>
@@ -37,36 +37,15 @@
</div>
<u> <span style="font-weight: bold;">Preprocessor Library Support<br>
</span></u>
<div>The library offers support for variadic macros for those
compilers which support the feature. The library can automatically
detect whether a compiler supports variadic macros and sets the
macro BOOST_PP_VARIADICS accordingly to 1 if the compiler supports
variadic macros or 0 if the compiler does not support variadic
macros.<br>
<div>The library assumes support for variadic macros for all
compilers using the library.<br>
<br>
The end-user can #define BOOST_PP_VARIADICS to 1 or 0 himself in a
translation unit, before including any preprocessor header files,
to prevent the library from attempting to detect whether the
compiler supports variadic macros. This has the effect of manually
turning on or off variadic macro support in the library. Of course
if one manually turns on variadic macro support in the library,
and one's compiler does not support variadic macros, functionality
in the library which uses variadic macros will fail with error
messages from the compiler.<br>
<br>
When BOOST_PP_VARIADICS is 1, the library offers some extended
functionality by using variadic macros, and also offers extended
support for working 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>
<a name="vmvcquirk"></a>Visual C++'s default preprocessor has a few
quirks related to variadic macros which require the end-user to code
slightly differently. When Visual C++'s default preprocessor is being
used BOOST_PP_VARIADICS_MSVC is 1, otherwise it is 0. In this way the
end-user can test for the presence of Visual C++'s default preprocessor
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,
@@ -75,42 +54,33 @@
variadic data directly.<br>
</div>
<a name="VNotation"></a>
<h4>Notation For Variadic Macros<br>
</h4>
<div>In the documentation, headers which have variadic macros, and
variadic macros themselves, have a notation of '(v)' appended to
them. For the variadic macros themselves this signifies that
BOOST_PP_VARIADICS must be 1 for those variadic macros to be
usable. For variadic macros which have a non-variadic equivalent,
the non-variadic equivalent will be used if BOOST_PP_VARIADICS is
set to 0. </div>
<h4>Extended Functionality Using Variadic Macros<br>
</h4>
<div>Some macros in the library offer extended functionality through
the use of variadic macros.<br>
<br>
The variadic macro version offers the same functionality as the
non-variadic version, but because of the ability of the variadic
parameters to encompass a variable number of arguments, it also
offers an enhanced syntax using the same macro name.<br>
The variadic macro version offers extended functionality because
of the ability of the variadic parameters to encompass a variable
number of arguments. The library has functionality which can know
the number of variadic arguments passed when invoking a variadic
macro. This allows the same variadic macro to work
with different numbers of parameters, therefore providing more
than one syntactical equivalent for the same macro name.<br>
<br>
The macros in the library which offer this enhanced functionality
are all centered on <i>tuple</i> manipulation. With variadic
macros it is possible to manipulate tuples without having to know
the size of the tuple. So while the invoker can still specify the
size when using tuple macro 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>
size when using tuple macro functionality, there are syntactical
versions of each of the tuple macros where the size need not be
specified.<br>
</div>
<h4>Extended Support For Variadic Data</h4>
<div>The library offers extended support for working with variadic
data which goes beyond the functionality offered by the C++
specification for variadic macros. It does this through
preprocessor programming and by using some of the other
functionality in the library itself. Header and macro names in the
library which offer extended support for working with variadic
data, and need the compiler to support variadic macros, are marked
with a (v)<sup> </sup>to indicate a variadic macro.<br>
functionality in the library itself.<br>
<br>
The form of the functionality which the library offers is centered
on two macros which work with variadic data itself, and a set of
@@ -125,16 +95,12 @@
types are BOOST_PP_VARIADIC_TO_ARRAY, BOOST_PP_VARIADIC_TO_LIST,
BOOST_PP_VARIADIC_TO_SEQ, and BOOST_PP_VARIADIC_TO_TUPLE.<br>
<br>
All of these macros need compiler support for variadic data and
only exist if BOOST_PP_VARIADICS is 1. <br>
<br>
The remaining four macros, which convert from a library data type
to comma-separated preprocessor tokens, which is the form of
variadic data, do not need compiler support for variadic macros.
These functions are BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM,
BOOST_PP_SEQ_ENUM, and BOOST_PP_TUPLE_ENUM. However if one wishes
to use this variadic data reliably as arguments to other macros,
one needs variadic macro support.<br>
variadic data, do not use variadic macros. These functions are
BOOST_PP_ARRAY_ENUM, BOOST_PP_LIST_ENUM, BOOST_PP_SEQ_ENUM, and
BOOST_PP_TUPLE_ENUM. You can use this variadic data reliably as
arguments to other macros using variadic macro support.<br>
</div>
<h4><a name="C20_Support_For_Variadic_Macros"></a>C++20 Support For
Variadic Macros</h4>
@@ -182,15 +148,12 @@
<div>An array as a preprocessor data type is a two-element tuple
where the first element is the array size and the second element
is a tuple which constitutes the array data. Because a tuple knows
its own size when the compiler supports variadic macros, there is
its own size because of compiler support for variadic macros, there is
no reason to use the array preprocessor data type as opposed to
the tuple preprocessor data type; the tuple data type now has all
of the functionality which the array data type has and is
syntactically easier to use. With variadic macro support, which is
now officially part of the latest C++ standard, the preprocessor
array data type is essentially obsolete for conforming C++
compilers. Only if your compiler does not support variadic macros
is the preprocessor array data type still useful.</div>
syntactically easier to use. The preprocessor array data type is
essentially obsolete for modern C++ compilers.</div>
<u style="font-weight: bold;">Using Variadic Data</u>
<div>Variadic data exists in the form of comma-separated
preprocessor tokens. This is the case whether the variadic data
@@ -217,9 +180,9 @@
to work and may fail.<br>
</span><br>
This occurs because of a preprocessor weakness in a number of
compilers, currently most notably Visual C++. Even passing
variadic data as arguments to a non-variadic macro, when it is not
represented in the form of&nbsp; __VA_ARGS__, may fail with
compilers, currently most notably Visual C++'s default preprocessor.
Even passing variadic data as arguments to a non-variadic macro, when
it is not represented in the form of&nbsp; __VA_ARGS__, may fail with
certain compilers.<br>
<br>
What follows are very simple examples, showing how variadic data
@@ -251,9 +214,8 @@
BOOST_PP_OVERLOAD and on to a non-variadic macro.<br>
</u></h4>
<div class="code">
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3));<br><br>/* For Visual C++ it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
<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++'s default preprocessor it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
</div>
<br>
<div>Although these techniques will work when passing variadic data
to non-variadic macros, it is much better and less problematical
to work internally with the existing library data types and to
@@ -263,7 +225,6 @@
</div>
<b>See</b> <b>Also</b><br>
<ul>
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
</li>
<li><a href="../headers/variadic.html">Variadic Macros<br>