
7 Mar
2010
7 Mar
'10
7:15 p.m.
AMDG Sylvain Bougerel wrote:
BOOST_AUTO_TEST_CASE( test_details_key ) { BOOST_CHECK(stupid_cast<float, int>(1.0) == 1); }
It give the following error with g++ (GCC) 4.4.3: try.cpp:40:48: error: macro "BOOST_CHECK" passed 2 arguments, but takes just 1 try.cpp: In member function 'void test_details_key::test_method()': try.cpp:40: error: 'BOOST_CHECK' was not declared in this scope
<snip> BOOST_AUTO_TEST_CASE( test_details_key ) { BOOST_CHECK((stupid_cast<float, int>(1.0) == 1)); // <----- I wrapped it in parenthesis }
All macros behave this way. The extra parentheses are needed. In Christ, Steven Watanabe