BOOST_PP_CAT: Outputting a comma `,`

221 Views Asked by At

How do I use the preprocessor (here I'm using Boost's BOOST_PP_CAT) to print output containing a comma ,. For example,

#define PUBLICBD(base, derived) BOOST_PP_CAT(BOOST_PP_CAT(base, BOOST_PP_CAT(<T , BOOST_PP_IF(1, BOOST_PP_COMMA, BOOST_PP_EMPTY)() )) , BOOST_PP_CAT( derived, <T>>))

PUBLICBD(B,D) // expect B<T , D<T>>
                            ^ missing

I've tried the approach outlined by the boost docs but clearly it doesn't seem to work. What am I missing?

0

There are 0 best solutions below