boost::test 1.33 compile problem on VC7.0+STLport (1.32 fine)
Hi, I just upgraded to Boost 1.33 and a set of my unit test routines written against boost::test 1.32 have suddenly started reporting compile errors. I can trigger the issue very simply: --- #include <boost/test/included/unit_test_framework.hpp> #include <boost/test/unit_test.hpp> using namespace boost::unit_test; test_suite* init_unit_test_suite( int argc, char* argv[] ) { test_suite* test = BOOST_TEST_SUITE( "tests" ); } --- In Boost 1.32 this works fine, in Boost 1.33 it reports: --- c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2440: 'initializing' : cannot convert from 'long' to 'boost::unit_test::for _each::static_any_t' Reason: cannot convert from 'long' to 'const boost::unit_test::for_each::static_any_base' No constructor could take the source type, or constructor overload resolution was ambiguous c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2143: syntax error : missing ')' before '=' c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2143: syntax error : missing ';' before '=' c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2059: syntax error : ')' c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2143: syntax error : missing ';' before '{' c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2181: illegal else without matching if c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2440: 'initializing' : cannot convert from 'long' to 'boost::unit_test::for_each::static_any_t' Reason: cannot convert from 'long' to 'const boost::unit_test::for_each::static_any_base' No constructor could take the source type, or constructor overload resolution was ambiguous --- .. and so on (hits upper error limit). I've just reverted back to 1.32 for now, but can you tell me why this happens? Many thanks Steveboost::test 1.33 compile problem on VC7.0+STLport
Hi,. Steve Really sorry for not unswering till now.
I just upgraded to Boost 1.33 and a set of my unit test routines written against boost::test 1.32 have suddenly started reporting compile errors.
[...]
c:\temp\boost_1_33_0\boost\test\impl\framework.ipp(305) : error C2440: 'initializing' : cannot convert from 'long' to 'boost::unit_test::for _each::static_any_t' Reason: cannot convert from 'long' to 'const boost::unit_test::for_each::static_any_base' No constructor could take the source type, or constructor overload resolution was ambiguous
[...]
I've just reverted back to 1.32 for now, but can you tell me why this happens?
Problem occures with FOREACH facility (it's more portable, supposedly, variation of BOOST_FOREACH). I've tuned this facility a lot and it seemed to work on most compilers. Now I do not have an access to VC7.0 anymore, but regression test did not show an errors. Something with VC7.0 + STLport combination. If you could locate an issue yourself (use boost/libs/test/test/foreach_test.cpp as test engine) I could apply the patch. It should be something trivial, since this facility works almost everywhere. If not I will try to address it myself before next release. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Steve Streeting