From: Daryle Walker (darylew_at_[hidden])
Date: 2001-05-06 16:17:37
on 5/5/01 7:47 AM, John Maddock at John_Maddock_at_[hidden] wrote:
>> The file compiled just fine; the error is at link-time. It started happening
>> when I first wrapped the testing functions as class-static member functions.
>> The other two tests are not affected. I have no idea what is causing this
>> problem. I'm using Metrowerks CodeWarrior Pro 5.3 for the Mac OS.
> First the good news, the new version builds OK with gcc, Borland C++, and
> VC6. All link correctly when the "master_test" that you commented out is
> uncommented, so it looks as though you have a Metroworks specific problem
> here, sorry :-(
I got around it by using explicit template instantiations in version 20.
> Now the bad news... the VC6 tests are still failing, however the reason is
> predictable - some of the crc interfaces use function templates with
> non-deduced parameters, currently the argmented_crc tests are working
> (don't know why this should be, experience suggests that they probably
> won't work for all possible template paramters), but the functional tests
> for the crc function are failing (or at least two of them are, one's
> getting passed the correct parameters "by accident").
Are you sure it's "by accident"? From other posts I've read, this VC6
problem isn't that it scrambles all template functions with non-deduced
parameters, it's that VC6 creates only one version of the function template
and mistakenly calls that version for all versions of the function template?
I only use one version of (each) argmented_crc template function, so the
problem doesn't show up.
> Daryle, what I suggest you do is place the functional and argmented
> interfaces inside some #ifdefs:
> #ifndef BOOST_NO_NON_DEDUCED_TEMPLATE_PARAMETERS
> // code
> Likewise the tests for those interfaces, does this sound reasonable?
Is this #define in <boost/config.hpp>? The newest version of "crc.zip" (20)
calls boost::crc through a function pointer that's explicitly initialized,
maybe that'll work.
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk