diff --git a/doc/headers.html b/doc/headers.html index 7df8cb0..b26fb96 100644 --- a/doc/headers.html +++ b/doc/headers.html @@ -80,6 +80,7 @@
  • facilities.hpp
  • facilities/
  • apply.hpp
  • +
  • check_empty.hpp
  • empty.hpp
  • expand.hpp
  • identity.hpp
  • diff --git a/doc/headers/facilities/check_empty.html b/doc/headers/facilities/check_empty.html new file mode 100644 index 0000000..81cdf8d --- /dev/null +++ b/doc/headers/facilities/check_empty.html @@ -0,0 +1,29 @@ + + + facilities/check_empty.hpp + + + +
    + The facilities/check_empty.hpp header defines a variadic macro for the C++20 level that checks if its data is empty or not. +
    +

    Usage

    +
    + #include <boost/preprocessor/facilities/check_empty.hpp> +
    +

    Contents

    + +
    +
    + © Copyright Edward Diener 2019 +
    +
    +

    Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or + copy at www.boost.org/LICENSE_1_0.txt)

    +
    + + diff --git a/doc/ref.html b/doc/ref.html index 749e881..e3f78b2 100644 --- a/doc/ref.html +++ b/doc/ref.html @@ -45,6 +45,7 @@
  • BOOL
  • CAT
  • +
  • CHECK_EMPTY
  • COMMA
  • COMMA_IF
  • COMPL
  • diff --git a/doc/ref/check_empty.html b/doc/ref/check_empty.html new file mode 100644 index 0000000..76cef8b --- /dev/null +++ b/doc/ref/check_empty.html @@ -0,0 +1,68 @@ + + + BOOST_PP_CHECK_EMPTY + + + +
    The BOOST_PP_CHECK_EMPTY variadic macro +checks to see if its variadic input is empty or not. It expands to 1 if its input +is empty and expands to 0 if its input is not empty. The macro only exists when +the compilation is at the C++20 level and the __VA_OPT__ construct is supported.
    +

    Usage

    +
    BOOST_PP_CHECK_EMPTY(...) (v)
    +
    +

    Arguments

    +
    +
    ...
    +
    +
    The variadic data to be checked for emptiness.
    +
    +

    Remarks

    +
    +When the macro invocation BOOST_PP_VARIADIC_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.
    +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. +
    +

    See Also

    + +

    Requirements

    +
    Header:  <boost/preprocessor/facilities/check_empty.hpp> +
    +

    Sample Code

    +
    +
    +#include <boost/preprocessor/facilities/check_empty.hpp>
    +
    +# if BOOST_PP_VARIADIC_OPT()
    +
    +#define DATA
    +#define OBJECT OBJECT2
    +#define OBJECT2
    +#define FUNC(x) FUNC2(x)
    +#define FUNC2(x)
    +#define FUNC_GEN(x,y) (1,2,3)
    +
    +BOOST_PP_CHECK_EMPTY(DATA)     // expands to 1
    +BOOST_PP_CHECK_EMPTY(OBJECT)   // expands to 1
    +BOOST_PP_CHECK_EMPTY(FUNC(1))  // expands to 1
    +BOOST_PP_CHECK_EMPTY(FUNC)     // expands to 0
    +BOOST_PP_CHECK_EMPTY(FUNC_GEN) // expands to 0
    +
    +#endif
    +
    +
    +
    +
    © Copyright Edward Diener 2019
    +
    +

    Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt +or copy at www.boost.org/LICENSE_1_0.txt)

    +
    + + diff --git a/doc/ref/variadic_opt.html b/doc/ref/variadic_opt.html index d8c425a..7057cbc 100644 --- a/doc/ref/variadic_opt.html +++ b/doc/ref/variadic_opt.html @@ -16,6 +16,19 @@ Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.
    None
    +

    Remarks

    +
    + This macro only returns 1 if the compiler is compiling at its own C++20 level and + __VA_OPT__ is supported. It is possible for a compiler to support the __VA_OPT__ + construct when not compiling at its own C++20 level, but this macro will return + 0 in that case even if __VA_OPT__ is normally supported for that level. The reason + for this is that such a compiler may have a compiler switch, enforcing a strict + adherence to a particular C++ standard level, which gives a warning or an error + if __VA_OPT__ is specified below the C++20 level, and the preprocessor library + wants to avoid that happening. Therefore the macro will only test to see whether + or not __VA_OPT__ is supported at the C++20 level, while otherwise always returning + 0 for all lesser C++ standard levels. +

    Requirements

    Header:  <boost/preprocessor/variadic/opt.hpp>
    diff --git a/doc/topics.html b/doc/topics.html index 5826a58..cff091a 100644 --- a/doc/topics.html +++ b/doc/topics.html @@ -15,6 +15,7 @@
  • file iteration
  • evaluated slots
  • variadic macros
  • +
  • emptiness