boost 1.32 breaks my code

Dear boost developpers, I just downloaded the new version, but some changes break my code. First I get not BOOST_MPL_ASSERT compilable on VC 7.1. From the documentation I could read that it could replace BOOST_MPL_ASSERT_IS_SAME, but I removed it completely, and switched back to BOOST_STATIC_ASSERT. Second I think the boost::bind has changed. This leads to compile errors in a double bind construction. The last time I tracked a problem with boost::bind it took me three days tofollow the source code. I don't know if I spent so much time again, I can replace the code, by not using boost::bind and write it explicitly. Last I get warning C4913 constantly. It's reported in 'is_incrementable.hpp' (line 56). Wkr, me _________________________________________________________________ Talk with your online friends with MSN Messenger http://messenger.msn.nl/

"gast 128"
First I get not BOOST_MPL_ASSERT compilable on VC 7.1. From the documentation I could read that it could replace BOOST_MPL_ASSERT_IS_SAME, but I removed it completely, and switched back to BOOST_STATIC_ASSERT.
Please post the code. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams
"gast 128"
writes: First I get not BOOST_MPL_ASSERT compilable on VC 7.1. From the documentation I could read that it could replace BOOST_MPL_ASSERT_IS_SAME, but I removed it completely, and switched back to BOOST_STATIC_ASSERT.
Please post the code.
That's simple: #include "boost/mpl/assert.hpp" void Testmpl6() { BOOST_MPL_ASSERT(false); //fails with error C2143: syntax error : missing '}' before '(' BOOST_MPL_ASSERT((false)); //same error }

gast128
David Abrahams
writes: "gast 128"
writes: First I get not BOOST_MPL_ASSERT compilable on VC 7.1. From the documentation I could read that it could replace BOOST_MPL_ASSERT_IS_SAME, but I removed it completely, and switched back to BOOST_STATIC_ASSERT.
Please post the code.
That's simple:
#include "boost/mpl/assert.hpp"
void Testmpl6() { BOOST_MPL_ASSERT(false); //fails with error C2143: syntax error : missing '}' before '(' BOOST_MPL_ASSERT((false)); //same error }
But neither of those is supposed to work.
BOOST_MPL_ASSERT((<bool-valued-nullary-metafunction>))
is the only legal way to use this macro. For example,
BOOST_MPL_ASSERT((boost::mpl::false_))
which of course will fail to compile because the condition is false.
BOOST_MPL_ASSERT((boost::mpl::true_))
will pass.
If you are replacing BOOST_MPL_ASSERT_IS_SAME(x, y) you need to write:
BOOST_MPL_ASSERT((boost::is_same

--- gast128
BOOST_MPL_ASSERT((boost::mpl::false_))
This gives the same error on VC++ 7.1: "error C2143: syntax error : missing '}' before '('"
I'll admit the error message looks cryptic, but since MSVC 7.1 is not my main development compiler, I haven't griped about such things that much. If you replace your function with void Testmpl6() { BOOST_MPL_ASSERT((boost::mpl::true_)); } will your code still fail to compile?
I see in 'boost/mpl/assert.hpp' heavy use of the pp library, maybe it has to do with this. I do not get seriuos pp samples running on VC++ 7.1.
Many invocations of BOOST_PP_CAT are not what I'd call "heavy use".
Me.
Try posting your real name so I don't look like I'm talking to myself when referring to you. __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail

gast128
BOOST_MPL_ASSERT((boost::mpl::false_))
This gives the same error on VC++ 7.1: "error C2143: syntax error : missing '}' before '('"
I see in 'boost/mpl/assert.hpp' heavy use of the pp library, maybe it has to do with this. I do not get seriuos pp samples running on VC++ 7.1.
No, it must be something else. Works perfectly for me, and I assure
you that all of MPL was thoroughly tested on VC 7.1:
Program:
#include "boost/mpl/assert.hpp"
void Testmpl6()
{
BOOST_MPL_ASSERT((boost::mpl::false_));
}
Command:
CALL "C:\Program Files\Microsoft Visual Studio .NET \
2003\VC7\bin\VCVARS32.BAT" > nul
cl /Zm800 -nologo /EHsc -c /Z7 /Od /Ob0 /EHsc /GR /MDd /Op
/Zc:wchar_t,forScope -I"c:\boost" -Fo"c:\tmp\foo.obj"
-Tp"c:\tmp\foo.cpp"
Output:
foo.cpp(6) : error C2664: 'boost::mpl::assertion_failed' : cannot
convert parameter 1 from 'boost::mpl::failed
************boost::mpl::bool_

David Abrahams
No, it must be something else. Works perfectly for me, and I assure you that all of MPL was thoroughly tested on VC 7.1:
code snip
And of course, if I replace "false_" with "true_", compilation succeeds. Can you reporoduce these results with the same program and command-lines?
Yes this works. In fact it is the /Z7 switch witch triggers succesful compilation instead of the /ZI we use (default for VC, if you work inside the IDE). I get a 'deja vu' feeling from the days of VC++ 4.2 when some std::map constructs didn't compile on /ZI while the same code builded succesfully with less debug info (e.g. /Z7). As far as the pp statements: I have seen the library and tried it enthusiasticly. Unfortunately it were two days of frustration, and that because of preprocessor failures which are always harder to track than just compilation errors. In the end I could track it down that even a simple case of using the pp wasn't accepted by VC++ 7.1. Of course I used the /ZI switch, which we can't let go for the project, because it gives maximum debug info. Thanks, Me (yes I can put my real name here, but I am pretending to be modest...)
participants (5)
-
Cromwell Enage
-
David Abrahams
-
gast 128
-
gast128
-
Peter Dimov