Re: [Boost-users] Boost-users Digest, Vol 1106, Issue 1
Message: 7 Date: 02 Dec 2006 17:51:00 -0600 From: Aleksey Gurtovoy
Subject: Re: [Boost-users] odd msvc 7.1 compilation errors with mpl To: boost-users@lists.boost.org Cc: dave@boost-consulting.com, craigp Message-ID: Content-Type: text/plain; charset=us-ascii craigp writes:
For some reason, I can't get the IDE to compile BOOST_MPL_ASSERT. I tried <snip>
This is a known issue: the errors you see are specific to MSVC "Edit & Continue" mode, in which the __LINE__ macro (used internally in MPL asserts) stops being a preprosessing-time constant and becomes a reference to a global run-time variable (http://support.microsoft.com/kb/199057).
To alleviate this problem, Microsoft has introduced a proprietary predefined macro __COUNTER__ (http://msdn2.microsoft.com/en-us/library/b0084kay.aspx), intended to serve as a replacement for __LINE__ in situations where the latter is used to generate a unique identifier rather than to actually refer to a line number (which is the case with MPL asserts). Unfortunately, because __COUNTER__ is incremented every time it's used, fixing this is a bit more complicated then just a search & replace for __LINE__, and therefore it has to wait for 1.35 (or you can grab the latest version of "boost/mpl/assert.hpp" from Boost CVS's HEAD trunk).
HTH, -- Aleksey Gurtovoy MetaCommunications Engineering
thanks Aleksey!! works fine now. cheers, --craig ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
http://boost.org/more/discussion_policy.htm#effective Thanks, -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
craigp
-
David Abrahams