Hello *,


I have some pre-processor sequence in form of:

(X1) (X2) (X3) (X4)

which is expanded by BOOST_PP_SEQ_FOR_EACH to template parameters:

some_template<X1, X2, X3, X4> ...


My problem now is that some of Xn parameters can be a template instantiation and that actually causes PP to think, that there are more parameters to the function applied by ..._SEQ_FOR_EACH.
Example: some_other_template<T1, T2> cause preprocessor to think that there are 2 params some_other_template<T1 and T2>.

Putting the parameter into additional braces like ((X4)) results in the template:

some_template<X1, X2, X3, (X4)> and that results in a compiler error. I know this construct can switch off ADL, but I don't know why it result here in a compiler error, since I fully qualify the X4 (from which namespace it is). Is there any way to treat Xn as a single paramer but during the final pre-processing stage get rid of additional braces?


Many thanks,
Ovanes