#include <boost/preprocessor/punctuation/comma_if.hpp> #include <boost/preprocessor/repetition/repeat.hpp> #define MACRO(z, n, text) BOOST_PP_COMMA_IF(n) text BOOST_PP_REPEAT(3, MACRO, class) // expands to class, class, class
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)