After long time searching how to generate function with variadic argument i found some solution.
#define item(z, n, _) \
BOOST_PP_EXPR_IF(n, +) BOOST_PP_CAT(p, n) \
#define add(z, n, _) \
template inline T add( BOOST_PP_ENUM_PARAMS( BOOST_PP_INC(n), T p) ) \
{ \
return BOOST_PP_REPEAT(BOOST_PP_INC(n), item, ~); \
} \
BOOST_PP_REPEAT(ADD_MAX_ARITY, add, ~)
#undef item
#undef add
This is macros generate function, like T add(...){ return a+b....;}, and i founded how to do macro recursive expansion. Macro recursive expansion to a sequence. And my question may be possible to mix previous 2 solution to generate something like this?
#define MPL(x) boost::mpl::vector{boost::mpl::char_{x}}
#define MPL1(x,x1) boost::mpl::vector{boost::mpl::char_{x} ,boost::mpl::char_{x1} }
........
#define MPLN(x,..xn) boost::mpl::vector{boost::mpl::char_{x}...,boost::mpl::char_{xn} }