Changed name of macro from BOOST_PP_VARIADIC_OPT to BOOST_PP_VARIADIC_HAS_OPT

This commit is contained in:
Edward Diener
2019-10-19 05:49:13 -04:00
parent 771edacbff
commit 1473215dc7
16 changed files with 36 additions and 36 deletions

View File

@ -19,17 +19,17 @@ the compilation is at the C++20 level and the __VA_OPT__ construct is supported.
</dl>
<h4>Remarks</h4>
<div>
When the macro invocation BOOST_PP_VARIADIC_OPT() expands to 1, then this
When the macro invocation BOOST_PP_VARIADIC_HAS_OPT() expands to 1, then this
macro exists and can be invoked, otherwise this macro does not exist
and attempting to invoke it will lead to a preprocessor error that the macro
can not be found. Because of this condition the header file for including
this macro includes the header file for the BOOST_PP_VARIADIC_OPT macro.<br>
this macro includes the header file for the BOOST_PP_VARIADIC_HAS_OPT macro.<br>
It is possible to pass data to this macro which expands to nothing, in which
case this macro will expand to 1 just as if nothing has been passed.
</div>
<h4>See Also</h4>
<ul>
<li><a href="variadic_opt.html">BOOST_PP_VARIADIC_OPT</a></li>
<li><a href="variadic_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a></li>
</ul>
<h4>Requirements</h4>
<div> <b>Header:</b> &nbsp;<a href="../headers/facilities/check_empty.html">&lt;boost/preprocessor/facilities/check_empty.hpp&gt;</a>
@ -39,7 +39,7 @@ case this macro will expand to 1 just as if nothing has been passed.
<pre>
#include &lt;<a href="../headers/facilities/check_empty.html">boost/preprocessor/facilities/check_empty.hpp</a>&gt;
# if <a href="variadic_opt.html">BOOST_PP_VARIADIC_OPT</a>()
# if <a href="variadic_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
#define DATA
#define OBJECT OBJECT2

View File

@ -1,15 +1,15 @@
<html>
<head>
<title>BOOST_PP_VARIADIC_OPT</title>
<title>BOOST_PP_VARIADIC_HAS_OPT</title>
<link rel="stylesheet" type="text/css" href="../styles.css">
</head>
<body>
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_OPT</b> macro
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_HAS_OPT</b> macro
determines whether or not the C++20 __VA_OPT__ construct is supported for the compiler's preprocessor being used.
Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.
</div>
<h4>Usage</h4>
<div class="code"> <b>BOOST_PP_VARIADIC_OPT</b>() <br>
<div class="code"> <b>BOOST_PP_VARIADIC_HAS_OPT</b>() <br>
</div>
<h4>Arguments</h4>
<dl>
@ -36,7 +36,7 @@ Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.
<div>
<pre>
#include &lt;<a href="../headers/variadic/opt.html">boost/preprocessor/variadic/opt.hpp</a>&gt;<br>
#if <a href="variadic_opt.html">BOOST_PP_VARIADIC_OPT</a>()
#if <a href="variadic_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
// Preprocessor code which uses __VA_OPT__
#else
// Preprocessor code which does not use __VA_OPT__
@ -47,7 +47,7 @@ or within a macro definition<br><br>
<pre>
#include &lt;boost/preprocessor/control/iif.hpp&gt;
#include &lt;<a href="../headers/variadic/opt.html">boost/preprocessor/variadic/opt.hpp</a>&gt;<br>
#define USE_OPT(...) BOOST_PP_IIF(<a href="variadic_opt.html">BOOST_PP_VARIADIC_OPT</a>(),MACRO_USING_OPT,MACRO_NOT_USING_OPT)(__VA_ARGS__)
#define USE_OPT(...) BOOST_PP_IIF(<a href="variadic_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>(),MACRO_USING_OPT,MACRO_NOT_USING_OPT)(__VA_ARGS__)
#define MACRO_USING_OPT(...) __VA_OPT__( preprocessor tokens ) anything
#define MACRO_NOT_USING_OPT(...) anything
</pre>