Hash review: hash_float_test broken?

Sorry if this has come up before, but all the compilers I tested with refuced to compile hash_float_test: hash_float_test.cpp ..\..\..\..\libs\functional\hash\test\hash_float_test.cpp(99) : error C2501: 'BOOST_META_FUNC_TEST_CASE' : missing storage-class or type specifiers ..\..\..\..\libs\functional\hash\test\hash_float_test.cpp(99) : error C2440: 'initializing' : cannot convert from 'void (__cdecl *)(T1 *)' to 'int' Context does not allow for disambiguation of overloaded function ..\..\..\..\libs\functional\hash\test\hash_float_test.cpp(105) : error C2275: 'float_types' : illegal use of this type as an expression ..\..\..\..\libs\functional\hash\test\hash_float_test.cpp(104) : see declaration of 'float_types' ..\..\..\..\libs\functional\hash\test\hash_float_test.cpp(105) : error C3861: 'BOOST_FUNC_TEMPLATE_TEST_CASE': identifier not found, even with argument-dependent lookup "cl" /Zm800 -nologo /EHsc -c /Z7 /Od /Ob0 /EHsc /GR /MDd /Op /Zc:forScope Zc:wchar_t -I"..\..\..\..\bin\boost\libs\functional\hash\test" -I"C:\Program Files\Microsoft Visual Studio .NET 003\VC7\include" -I"c:\data\boost\develop\boost" -Fo"..\..\..\..\bin\boost\libs\functional\hash\test\hash_float_test.test\vc-7_1\debug\threading-multi\hash_float_test.obj" -Tp"..\..\..\..\libs\functional\hash\test\hash_float_test.cpp" Thanks, John.

John Maddock wrote:
Sorry if this has come up before, but all the compilers I tested with refuced to compile hash_float_test:
hash_float_test.cpp
...\..\..\..\libs\functional\hash\test\hash_float_test.cpp(99) : error C2501: 'BOOST_META_FUNC_TEST_CASE' : missing storage-class or type specifiers
Sorry, it was written for the version of test in Boost 1.32, the attached version should work with CVS. By the way, I don't have access to recent versions of Visual C++, so the float functions might not work that well anyway (they need work arounds for a lot of compilers). Daniel

BOOST_TEST_CASE_TEMPLATE_FUNCTION(float_tests, T) {
Now you could also use test case template faciltiy in conjunction with auto unit test: typedef boost::mpl::list<float, double, long double> float_types; BOOST_AUTO_TEST_CASE_TEMPLATE( float_tests, T, float_types ) { .... } Gennadiy

Sorry, it was written for the version of test in Boost 1.32, the attached version should work with CVS.
Got it, yes that works.
By the way, I don't have access to recent versions of Visual C++, so the float functions might not work that well anyway (they need work arounds for a lot of compilers).
VC7.1 is pretty conforming fortunately, Thanks for the patch, John.
participants (3)
-
Daniel James
-
Gennadiy Rozental
-
John Maddock