Added OPT macro to determine whether C++20's __VA_OPT__ is supported or not. Updated the undocumented variadic IS_EMPTY to use the functionality of __VA_OPT__ if it exists to provide perfect functionality for testing for emptiness.

This commit is contained in:
Edward Diener committed 2019-09-25 06:29:04 -04:00
1 parent c436de6142
commit e476f10f52
11 files changed
+167 -24

No files matched your search

+14 -1
View File
@@ -38,7 +38,20 @@
#if BOOST_PP_VARIADICS
#if BOOST_PP_VARIADICS_MSVC /* Testing the VC++ variadic version */
# include <boost/preprocessor/variadic/opt.hpp>
#if defined(__cplusplus) && __cplusplus > 201703L && BOOST_PP_VARIADIC_OPT()
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 0 END
#elif BOOST_PP_VARIADICS_MSVC /* Testing the VC++ variadic version */
/* INCORRECT */