
9 Mar
2006
9 Mar
'06
7:21 p.m.
BOOST_PP_CAT involving __LINE__ fails for VC < 8.0 #include <boost/preprocessor/cat.hpp> void test() { int i=1; int BOOST_PP_CAT(i,__LINE__)=1; } with the following error message: d:\SourceCode\finally\test.cpp(5) : error C2374: 'i' : redefinition; multiple initialization d:\SourceCode\finally\test.cpp(4) : see declaration of 'i' d:\SourceCode\finally\test.cpp(5) : error C2143: syntax error : missing ';' before '=' d:\SourceCode\finally\test.cpp(5) : error C2143: syntax error : missing ';' before '=' Preprocessing the code using /P /EP first, yields valid code that compiles without problems. Regards, Peder