From 4fe7807f79a3cb2f4d3b93d167c3619c882552cf Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 20 Oct 2019 17:00:51 -0400 Subject: [PATCH] Add BOOST_PP_VA_OPT implementation --- .../boost/preprocessor/facilities/va_opt.hpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 include/boost/preprocessor/facilities/va_opt.hpp diff --git a/include/boost/preprocessor/facilities/va_opt.hpp b/include/boost/preprocessor/facilities/va_opt.hpp new file mode 100644 index 0000000..bb25f1b --- /dev/null +++ b/include/boost/preprocessor/facilities/va_opt.hpp @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2019. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP +# define BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP +# include +# if BOOST_PP_VARIADIC_HAS_OPT() +# include +# include +# include +# define BOOST_PP_VA_OPT(rdata,rempty,...) \ + BOOST_PP_TUPLE_REM() \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_CHECK_EMPTY(__VA_ARGS__), \ + rempty, \ + rdata \ + } \ +/**? +# endif /* BOOST_PP_VARIADIC_HAS_OPT() */ +# endif /* BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP */