#include <boost/preprocessor/facilities/empty.hpp> #include <boost/preprocessor/punctuation/paren.hpp> #define X(x) x #define MACRO(x, p) X ( x p MACRO(abc, BOOST_PP_RPAREN()) // expands to abc #define Y(x) MACRO(BOOST_PP_EMPTY BOOST_PP_RPAREN()(), 10) // expands to 10
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)