diff --git a/include/boost/preprocessor/variadic/detail/has_opt.hpp b/include/boost/preprocessor/variadic/detail/has_opt.hpp index 11b6552..79edf3b 100644 --- a/include/boost/preprocessor/variadic/detail/has_opt.hpp +++ b/include/boost/preprocessor/variadic/detail/has_opt.hpp @@ -16,12 +16,21 @@ # # if BOOST_PP_VARIADICS && defined(__cplusplus) && __cplusplus > 201703L # +# if BOOST_PP_VARIADICS_MSVC +# include +# endif +# # define BOOST_PP_VARIADIC_HAS_OPT_FUNCTION(...) \ __VA_OPT__(,) , 1, 0 \ /**/ # +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADIC_HAS_OPT_ELEM0(e0, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_HAS_OPT_ELEM_0(e0,__VA_ARGS__),) +# define BOOST_PP_VARIADIC_HAS_OPT_ELEM2(e0, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_HAS_OPT_ELEM_2(e0,__VA_ARGS__),) +# else # define BOOST_PP_VARIADIC_HAS_OPT_ELEM0(e0, ...) BOOST_PP_VARIADIC_HAS_OPT_ELEM_0(e0,__VA_ARGS__) # define BOOST_PP_VARIADIC_HAS_OPT_ELEM2(e0, ...) BOOST_PP_VARIADIC_HAS_OPT_ELEM_2(e0,__VA_ARGS__) +# endif # define BOOST_PP_VARIADIC_HAS_OPT_ELEM_0(e0, ...) e0 # define BOOST_PP_VARIADIC_HAS_OPT_ELEM_2(e0, e1, e2, ...) e2 # diff --git a/include/boost/preprocessor/variadic/has_opt.hpp b/include/boost/preprocessor/variadic/has_opt.hpp index 4e5035e..3ab0890 100644 --- a/include/boost/preprocessor/variadic/has_opt.hpp +++ b/include/boost/preprocessor/variadic/has_opt.hpp @@ -16,7 +16,7 @@ # # /* BOOST_PP_VARIADIC_HAS_OPT */ # -# if BOOST_PP_VARIADICS && defined(__cplusplus) && __cplusplus > 201703L && !BOOST_PP_VARIADICS_MSVC +# if BOOST_PP_VARIADICS && defined(__cplusplus) && __cplusplus > 201703L # include # define BOOST_PP_VARIADIC_HAS_OPT() \ BOOST_PP_VARIADIC_HAS_OPT_ELEM2(BOOST_PP_VARIADIC_HAS_OPT_FUNCTION(?),) \