3 <title>BOOST_PP_CHECK_EMPTY</title>
4 <link rel="stylesheet" type="text/css" href="../styles.css">
7 <div style="margin-left: 0px;"> The <b>BOOST_PP_CHECK_EMPTY</b> variadic macro
8 checks to see if its variadic input is empty or not. It expands to 1 if its input
9 is empty and expands to 0 if its input is not empty. The macro only exists when
10 the compilation is at the C++20 level and the __VA_OPT__ construct is supported.</div>
12 <div class="code"> <b>BOOST_PP_CHECK_EMPTY</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
18 <dd> The <i>variadic data</i> to be checked for emptiness. </dd>
22 When the macro invocation BOOST_PP_VARIADIC_HAS_OPT() expands to 1, then this
23 macro exists and can be invoked, otherwise this macro does not exist
24 and attempting to invoke it will lead to a preprocessor error that the macro
25 can not be found. Because of this condition the header file for including
26 this macro includes the header file for the BOOST_PP_VARIADIC_HAS_OPT macro.<br>
27 It is possible to pass data to this macro which expands to nothing, in which
28 case this macro will expand to 1 just as if nothing has been passed.
32 <li><a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a></li>
35 <div> <b>Header:</b> <a href="../headers/facilities/check_empty.html"><boost/preprocessor/facilities/check_empty.hpp></a>
40 #include <<a href="../headers/facilities/check_empty.html">boost/preprocessor/facilities/check_empty.hpp</a>>
42 # if <a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
45 #define OBJECT OBJECT2
47 #define FUNC(x) FUNC2(x)
49 #define FUNC_GEN(x,y) (1,2,3)
51 <a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(DATA) // expands to 1
52 <a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(OBJECT) // expands to 1
53 <a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC(1)) // expands to 1
54 <a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC) // expands to 0
55 <a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC_GEN) // expands to 0
61 <div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2019</i> </div>
62 <div style="margin-left: 0px;">
63 <p><small>Distributed under the Boost Software License, Version 1.0.
64 (See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
65 or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>