The BOOST_PP_VARIADIC_OPT macro determines whether or not the C++20 __VA_OPT__ construct is supported for the compiler's preprocessor being used. Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.

Usage

BOOST_PP_VARIADIC_OPT()

Arguments

None

Requirements

Header:  <boost/preprocessor/variadic/opt.hpp>

Sample Code

#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

© Copyright Edward Diener 2019

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)