1 # /* **************************************************************************
3 # * (C) Copyright Edward Diener 2014,2019.
4 # * Distributed under the Boost Software License, Version 1.0. (See
5 # * accompanying file LICENSE_1_0.txt or copy at
6 # * http://www.boost.org/LICENSE_1_0.txt)
8 # ************************************************************************** */
10 # /* See http://www.boost.org for most recent version. */
12 # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP
13 # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP
15 # include <boost/preprocessor/config/config.hpp>
17 # if BOOST_PP_VARIADICS
19 # include <boost/preprocessor/punctuation/is_begin_parens.hpp>
20 # include <boost/preprocessor/facilities/detail/is_empty.hpp>
22 #if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
24 #define BOOST_PP_IS_EMPTY(param) \
25 BOOST_PP_DETAIL_IS_EMPTY_IIF \
27 BOOST_PP_IS_BEGIN_PARENS \
33 BOOST_PP_IS_EMPTY_ZERO, \
34 BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
38 #define BOOST_PP_IS_EMPTY_ZERO(param) 0
40 # if defined(__cplusplus) && __cplusplus > 201703L
41 # include <boost/preprocessor/variadic/has_opt.hpp>
42 #define BOOST_PP_IS_EMPTY(...) \
43 BOOST_PP_DETAIL_IS_EMPTY_IIF \
45 BOOST_PP_VARIADIC_HAS_OPT() \
48 BOOST_PP_IS_EMPTY_OPT, \
49 BOOST_PP_IS_EMPTY_NO_OPT \
53 #define BOOST_PP_IS_EMPTY_FUNCTION2(...) \
56 #define BOOST_PP_IS_EMPTY_FUNCTION(...) \
57 BOOST_PP_IS_EMPTY_FUNCTION2(__VA_ARGS__) \
59 #define BOOST_PP_IS_EMPTY_OPT(...) \
60 BOOST_PP_VARIADIC_HAS_OPT_ELEM0(BOOST_PP_IS_EMPTY_FUNCTION(__VA_ARGS__),) \
63 #define BOOST_PP_IS_EMPTY(...) \
64 BOOST_PP_IS_EMPTY_NO_OPT(__VA_ARGS__) \
66 # endif /* defined(__cplusplus) && __cplusplus > 201703L */
67 #define BOOST_PP_IS_EMPTY_NO_OPT(...) \
68 BOOST_PP_DETAIL_IS_EMPTY_IIF \
70 BOOST_PP_IS_BEGIN_PARENS \
76 BOOST_PP_IS_EMPTY_ZERO, \
77 BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
81 #define BOOST_PP_IS_EMPTY_ZERO(...) 0
82 # endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
83 # endif /* BOOST_PP_VARIADICS */
84 # endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */