#include <boost/preprocessor/list/enum.hpp> #define LIST (w, (x, (y, (z, BOOST_PP_NIL)))) BOOST_PP_LIST_ENUM(LIST) // expands to w, x, y, z
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)