#include <boost/preprocessor/facilities/intercept.hpp> #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp> template<class X BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(4, class A, = X BOOST_PP_INTERCEPT)> struct sample { // ... }; /* expands to... template<class X, class A0 = X, class A1 = X, class A2 = X, class A3 = X> struct sample { // ... } */
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)