#include <boost/preprocessor/variadic/has_opt.hpp>
#if BOOST_PP_VARIADIC_HAS_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/has_opt.hpp>
#define USE_OPT(...) BOOST_PP_IIF(BOOST_PP_VARIADIC_HAS_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
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)