Updated docs for the the fact that in C++20 mode when __VA_OPT__ is supported variadic data passed some of the variadic macros can be empty.

This commit is contained in:
Edward Diener
2020-06-30 14:50:47 -04:00
parent a037024cec
commit e231fe7ad9
7 changed files with 448 additions and 384 deletions

View File

@ -1,37 +1,52 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_ARRAY_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<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>
</div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_ARRAY_ENUM</b>(<i>array</i>) </div>
<h4> Arguments </h4>
<dl>
<dt>array</dt>
<dd> The <i>array</i> whose elements are to be converted. </dd>
</dl>
<h4> Remarks </h4>
<div> This macro expands to a comma-separated list of the elements in <i>array</i>.&nbsp;
For example, <b>BOOST_PP_ARRAY_ENUM</b>((3,(<i>x,</i><i>y,</i><i>z</i>)))
expands to...
<div> <i>x</i>, <i>y</i>, <i>z</i> </div>
</div>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/array/enum.html">&lt;boost/preprocessor/array/enum.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/array/enum.html">boost/preprocessor/array/enum.hpp</a>&gt;<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>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_ARRAY_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<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>
</div>
<h4> Usage </h4>
<div class="code"> <b>BOOST_PP_ARRAY_ENUM</b>(<i>array</i>) </div>
<h4> Arguments </h4>
<dl>
<dt>array</dt>
<dd> The <i>array</i> whose elements are to be converted. </dd>
</dl>
<h4> Remarks </h4>
<div> This macro expands to a comma-separated list of the elements
in <i>array</i>.&nbsp;
For example, <b>BOOST_PP_ARRAY_ENUM</b>((3,(<i>x,</i><i>y,</i><i>z</i>)))
expands
to...
<div> <i>x</i>, <i>y</i>, <i>z<br>
</i> </div>
</div>
<p>&nbsp;&nbsp;&nbsp; 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 array is empty the resulting <i>variadic</i>
<i>data</i> will be empty.</p>
<h4> </h4>
<h4>Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/array/enum.html">&lt;boost/preprocessor/array/enum.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/array/enum.html">boost/preprocessor/array/enum.hpp</a>&gt;<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>

View File

@ -1,62 +1,62 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_LIST_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;">
The <b>BOOST_PP_LIST_ENUM</b> macro converts a <i>list</i> to a comma-separated list.
</div>
<h4>Usage</h4>
<div class="code">
<b>BOOST_PP_LIST_ENUM</b>(<i>list</i>)
</div>
<h4>Arguments</h4>
<dl>
<dt>list</dt>
<dd>
The <i>list</i> to be converted.
</dd>
</dl>
<h4>Remarks</h4>
<div>
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
this macro will produce:
<div>
<i>a</i>, <i>b</i>, <i>c</i>
</div>
</div>
<div>
Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.&nbsp;
There is no longer any such restriction.&nbsp;
It is more efficient, however, to use <b>BOOST_PP_LIST_ENUM_R</b> in such a situation.
</div>
<h4>See Also</h4>
<ul>
<li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
</ul>
<h4>Requirements</h4>
<div>
<b>Header:</b> &nbsp;<a href="../headers/list/enum.html">&lt;boost/preprocessor/list/enum.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div><pre>
#include &lt;<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>&gt;
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_LIST_ENUM</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_ENUM</b> macro
converts a <i>list</i> to a comma-separated list. </div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_LIST_ENUM</b>(<i>list</i>) </div>
<h4>Arguments</h4>
<dl>
<dt>list</dt>
<dd> The <i>list</i> to be converted. </dd>
</dl>
<h4>Remarks</h4>
<div> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>,
<b>BOOST_PP_NIL</b>))), this macro will produce:
<div> <i>a</i>, <i>b</i>, <i>c</i> </div>
</div>
<div> Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.&nbsp;
There is no longer any such restriction.&nbsp; It is more
efficient, however, to use <b>BOOST_PP_LIST_ENUM_R</b> in such a
situation.<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 if the list is empty the resulting <i>variadic</i>
<i>data</i> will be empty.</div>
<h4>See Also</h4>
<ul>
<li><a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/list/enum.html">&lt;boost/preprocessor/list/enum.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>&gt;
#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
</pre></div>
<hr size="1">
<div style="margin-left: 0px;">
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
</div>
<div style="margin-left: 0px;">
<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>
</pre>
</div>
<hr size="1">
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a
href="http://www.housemarque.com" target="_top">Housemarque Oy</a>
2002</i> <br>
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
<div style="margin-left: 0px;">
<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>

View File

@ -31,6 +31,12 @@
<i>a</i>, <i>b</i>, <i>c</i>
</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>
<ul>
<li><a href="list_enum.html">BOOST_PP_LIST_ENUM</a></li>

View File

@ -1,33 +1,46 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_VARIADIC_SIZE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_SIZE</b> variadic macro
expands to the size of the <i>variadic data </i>passed to it. </div>
<h4>Usage</h4>
<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>
</div>
<h4>Arguments</h4>
<dl>
<dt>...<br>
</dt>
<dd>&nbsp; <i>Variadic data </i>whose size is to be extracted. </dd>
</dl>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/variadic/size.html">&lt;boost/preprocessor/variadic/size.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/size.html">boost/preprocessor/variadic/size.hpp</a>&gt;<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>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_VARIADIC_SIZE</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_SIZE</b>
variadic macro
expands to the size of the <i>variadic data </i>passed to it. </div>
<h4>Usage</h4>
<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>
</div>
<h4>Arguments</h4>
<dl>
<dt>...<br>
</dt>
<dd>&nbsp; <i>Variadic data </i>whose size is to be extracted.</dd>
</dl>
<h4>Remarks</h4>
<p>&nbsp;&nbsp;&nbsp; In <a
href="../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 result will be 0.<br>
</p>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/variadic/size.html">&lt;boost/preprocessor/variadic/size.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/size.html">boost/preprocessor/variadic/size.hpp</a>&gt;<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>

View File

@ -1,32 +1,45 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_VARIADIC_TO_ARRAY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_ARRAY</b> variadic macro
converts <i>variadic data</i> to an <i>array</i>. </div>
<h4> Usage </h4>
<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>
</div>
<h4> Arguments </h4>
<dl>
<dt>...</dt>
<dd> The <i>variadic data</i> to be converted. </dd>
</dl>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/variadic/to_array.html">&lt;boost/preprocessor/variadic/to_array.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/to_array.html">boost/preprocessor/variadic/to_array.hpp</a>&gt;<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>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_VARIADIC_TO_ARRAY</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_ARRAY</b>
variadic macro
converts <i>variadic data</i> to an <i>array</i>. </div>
<h4> Usage </h4>
<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>
</div>
<h4> Arguments </h4>
<dl>
<dt>...</dt>
<dd> The <i>variadic data</i> to be converted.</dd>
</dl>
<h4>Remarks</h4>
<p>&nbsp;&nbsp;&nbsp; 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 result will be an empty array of the form '(0,())'.</p>
<h4> Requirements </h4>
<div> <b>Header:</b> &nbsp;<a
href="../headers/variadic/to_array.html">&lt;boost/preprocessor/variadic/to_array.hpp&gt;</a>
</div>
<h4> Sample Code </h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/to_array.html">boost/preprocessor/variadic/to_array.hpp</a>&gt;<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>

View File

@ -1,31 +1,45 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BOOST_PP_VARIADIC_TO_LIST</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_LIST</b>
variadic macro converts <i>variadic data</i> to a <i>list</i>. </div>
<h4>Usage</h4>
<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>
</div>
<h4>Arguments</h4>
<dl><dt>...</dt>
<dd> The <i>variadic data</i> to be converted.<br>
</dd>
</dl><h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/variadic/to_list.html">&lt;boost/preprocessor/variadic/to_list.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/to_list.html">boost/preprocessor/variadic/to_list.hpp</a>&gt;<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>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>BOOST_PP_VARIADIC_TO_LIST</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_TO_LIST</b>
variadic macro converts <i>variadic data</i> to a <i>list</i>. </div>
<h4>Usage</h4>
<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>
</div>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd> The <i>variadic data</i> to be converted.<br>
</dd>
</dl>
<h4>Remarks</h4>
<p>&nbsp;&nbsp;&nbsp; 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 result will be an empty list of the form 'BOOST_PP_NIL'.</p>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a
href="../headers/variadic/to_list.html">&lt;boost/preprocessor/variadic/to_list.hpp&gt;</a>
</div>
<h4>Sample Code</h4>
<div>
<pre>#include &lt;<a href="../headers/variadic/to_list.html">boost/preprocessor/variadic/to_list.hpp</a>&gt;<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>