From: Douglas Gregor (gregod_at_[hidden])
Date: 2004-01-30 12:20:00
On Friday 30 January 2004 10:54 am, Peter Dimov wrote:
> Douglas Gregor wrote:
> >> On the main branch, I've implemented operator== and operator!= for
> >> Boost.Function (but not in the form you expect).
> I am getting a C4800 warning from MSVC 7.1 ('int' forced to true/false) in
> This is a regression. The fix is trivial:
> return BOOST_FUNCTION_COMPARE_TYPE_ID(typeid(Functor), *type)?
> The definition of BOOST_FUNCTION_COMPARE_TYPE_ID is:
> # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) (X==Y)
> It should be:
> # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X) == (Y))
> Also, I'm not really sure whether we should pre-emptively "fix"
> type_info::operator= like this. Bugfixes should be in response to actual
> bug reports.
type_info::operator== doesn't work across shared libraries with GCC's new ABI,
and this is the accepted way to fix it. I grabbed the fix out of the Python
lib (where presumably they've already had this bug report).
Nobody's submitted a bug report about operator== not working on MSVC 6.0, but
I tried to support that anyway :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk