[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Using variadic macros</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9">
<link rel="home" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.10">
<link rel="up" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.10">
<link rel="prev" href="vmd_whyhow.html" title="Why and how to use">
<link rel="next" href="vmd_vc.html" title="Visual C++ define">
</head>
@@ -30,56 +30,34 @@
Variadic macros, as specified by C++11, is a feature taken from the C99 specification.
They are macros which take a final parameter denoted as '...' which represents
one or more final arguments to the macro as a series of comma-separated tokens.
In the macro expansion a special keyword of '__VA_ARGS__' represents the comma-separated
tokens. This information when passed to a variadic macro I call 'variadic macro
data', which gives its name to this library. The more general term 'variadic
data' is used in this documentation to specify data passed to a macro which
can contain any number of macro tokens as a single macro parameter, such as
is found in Boost PP data types.
</p>
<h4>
<a name="variadic_macro_data.vmd_vmacros.h0"></a>
<span class="phrase"><a name="variadic_macro_data.vmd_vmacros.boost_support"></a></span><a class="link" href="vmd_vmacros.html#variadic_macro_data.vmd_vmacros.boost_support">Boost
support</a>
</h4>
<p>
The Boost PP library has support for variadic macros and uses its own criteria
to determine if a particular compiler has that support. Boost PP defines or
uses the macro BOOST_PP_VARIADICS to denote whether the compiler being used
supports variadic macros. When BOOST_PP_VARIADICS is set to 1 the compiler
supports variadic macros, otherwise when BOOST_PP_VARIADICS is set to 0 the
compiler does not support variadic macros. If a user of Boost PP sets this
value, Boost PP uses the value the end-user sets, otherwise Boost PP defines
the value of BOOST_PP_VARIADICS based on its own analysis of the compiler being
used. This macro can also be checked to determine if a compiler has support
for variadic macros.
</p>
<h4>
<a name="variadic_macro_data.vmd_vmacros.h1"></a>
<span class="phrase"><a name="variadic_macro_data.vmd_vmacros.determining_variadic_macro_suppo"></a></span><a class="link" href="vmd_vmacros.html#variadic_macro_data.vmd_vmacros.determining_variadic_macro_suppo">Determining
variadic macro support</a>
</h4>
<p>
The VMD library automatically determines whether variadic macro support is
enabled for a particular compiler by also using the same BOOST_PP_VARIADICS
macro from Boost PP. The end-user of VMD can also manually set the macro BOOST_PP_VARIADICS
to turn on or off compiler support for variadic macros in the VMD library.
When BOOST_PP_VARIADICS is set to 0 variadic macros are not supported in the
VMD library, otherwise when BOOST_PP_VARIADICS is set to non-zero they are
supported in the VMD library. This same macro can be used to determine if VMD
supports variadic macros for a particular compiler.
In the macro expansion a special keyword of <code class="computeroutput"><span class="identifier">__VA_ARGS__</span></code>
represents the comma-separated tokens. This information when passed to a variadic
macro I call 'variadic macro data', which gives its name to this library. The
more general term 'variadic data' is used in this documentation to specify
data passed to a macro which can contain any number of macro tokens as a single
macro parameter, such as is found in Boost PP data types.
</p>
<p>
Since this library depends on variadic macro support, if BOOST_PP_VARIADICS
is set to 0, using any of the macros in VMD will lead to a compiler error since
the macro will not be defined. However just including any of the header files
in VMD, even with no variadic macro support for the compiler, will not lead
to any compiler errors.
The library assumes variadic macro support. If a compiler does not support
variadic macros the macros in the library will fail with preprocessor errors.
In previous versions of this library variadic macro support was determined
by the value of the BOOST_PP_VARIADICS object-like macro from the Boost Preprocessor
library, so that if this macro returned 0, none of the macros in the library
would be defined. This is no longer the case since the Boost preprocessor library
now also requires variadic macro support and BOOST_PP_VARIADICS always returns
1.
</p>
<p>
What this means for the end-user is that the compiler must be used in C++11
or higher mode, or that a compiler in C++98/C++03 mode supports variadic macros.
A number of major compilers, including Visual C++, gcc, and clang. do support
variadic macros in C++98/C++03 mode, as long as strict compliance to the C++98/C++03
standard is not turned on through that compiler's compiler flags.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2010-2017 Tropic Software
<td align="right"><div class="copyright-footer">Copyright © 2010-2017 Tropic Software
East Inc</div></td>
</tr></table>
<hr>