diff --git a/doc/ref/variadic_opt.html b/doc/ref/variadic_opt.html index 7383caa..d8c425a 100644 --- a/doc/ref/variadic_opt.html +++ b/doc/ref/variadic_opt.html @@ -23,11 +23,20 @@ Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.
#include <boost/preprocessor/variadic/opt.hpp>+
-#if BOOST_PP_VARIADIC_OPT()
-// Preprocessor code which uses __VA_OPT__
-#else
-// Preprocessor code which does not use __VA_OPT__
-#endif
+#if BOOST_PP_VARIADIC_OPT() +// Preprocessor code which uses __VA_OPT__ +#else +// Preprocessor code which does not use __VA_OPT__ +#endif +
+#include <boost/preprocessor/control/iif.hpp> +#include <boost/preprocessor/variadic/opt.hpp>
+#define USE_OPT(...) BOOST_PP_IIF(BOOST_PP_VARIADIC_OPT(),MACRO_USING_OPT,MACRO_NOT_USING_OPT)(__VA_ARGS__) +#define MACRO_USING_OPT(...) __VA_OPT__( preprocessor tokens ) anything +#define MACRO_NOT_USING_OPT(...) anything