
8 May
2008
8 May
'08
9 a.m.
Hello All, Compilator: VC++ 8.0 Library version: 1.34 I can't understand problem with code like this: #define SOME_SEQ (1)(2)(3) #define BAR_MACRO_1(S) BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(S)) #define FOO_MACRO(S) BOOST_PP_CAT(BAR_MACRO_, BOOST_PP_SEQ_HEAD(S) ## (S)) FOO_MACRO(SOME_SEQ) After preprocessing it looks like BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_2)) (2)(3) If I replace BOOST_PP_CAT with my own macro: #define MY_CAT(a, b) MY_CAT_I(a, b) #define MY_CAT_I(a, b) a ## b Everything is all right after preprocessing: 2, 3 Why? What is wrong? -- Best Regards, Sergey mailto:flex_ferrum@artberg.ru