forked from boostorg/preprocessor
Corrected implementation and testing for BOOST_PP_VA_OPT
This commit is contained in:
@ -16,14 +16,19 @@
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/check_empty.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# define BOOST_PP_VA_OPT(rdata,rempty,...) \
|
||||
BOOST_PP_TUPLE_REM() \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_CHECK_EMPTY(__VA_ARGS__), \
|
||||
rempty, \
|
||||
rdata \
|
||||
} \
|
||||
/**?
|
||||
# define BOOST_PP_VA_OPT_IMPL(atuple) \
|
||||
BOOST_PP_TUPLE_REM() atuple \
|
||||
/**/
|
||||
# define BOOST_PP_VA_OPT(rdata,rempty,...) \
|
||||
BOOST_PP_VA_OPT_IMPL \
|
||||
( \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_CHECK_EMPTY(__VA_ARGS__), \
|
||||
rempty, \
|
||||
rdata \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# endif /* BOOST_PP_VARIADIC_HAS_OPT() */
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP */
|
||||
|
Reference in New Issue
Block a user