Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2006-03-09 17:44:19


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Peder Holt
> Sent: Thursday, March 09, 2006 11:21 AM
> To: boost_at_[hidden]
> Subject: [boost] [preprocessor] BOOST_PP_CAT fails for VC6.5 and VC7.1
>
> 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.

No time right now, but it has to do with debug info. See the recent thread on
the users' list "Boost.Preprocessor with __LINE__ in MSVC71".

Regards,
Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk