#include <boost/preprocessor/punctuation/paren_if.hpp> #define MACRO(c, x) BOOST_PP_LPAREN_IF(c) x BOOST_PP_RPAREN_IF(c) MACRO(0, text) // expands to text MACRO(1, text) // expands to (text)
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)