#include #define DECL(z, n, data) \ struct S##data##_##n\ {\ template\ static T back(T && t)\ {\ return t;\ }\ \ template\ static auto back(T && t, U &&... u)\ -> decltype(Impl::back(static_cast(u)...))\ {\ return Impl::back(static_cast(u)...);\ }\ };\ #define INNER(z, n, data) BOOST_PP_REPEAT(z, DECL, n) BOOST_PP_REPEAT(256, INNER, "dontcare") int main() { #define USE(z, n, data) int i##data##_##n = S##data##_##n::back(1,2,3); #define INNER_USE(z, n, data) BOOST_PP_REPEAT(z, USE, n) BOOST_PP_REPEAT(256, INNER_USE, "dontcare") }