Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-02-26 02:18:42

"Peter Dimov" <pdimov_at_[hidden]> writes:

> David Abrahams wrote:
>> testing.capture-output bind/
>> looks like a Boost bug.
>> ..\libs\bind\test\mem_fn_eq_test.cpp(175): test
>> 'boost::mem_fn(&X::mf0_1) != boost::mem_fn(&X::mf0_2)' failed in
>> function 'int __cdecl main(void)'
>> ..\libs\bind\test\mem_fn_eq_test.cpp(178): test
>> 'boost::mem_fn(&X::cmf0_1) != boost::mem_fn(&X::cmf0_2)' failed in
>> function 'int __cdecl main(void)'
>> ...
>> 36 errors detected.
> This is caused by the linker folding X::mf0_1 and X::mf0_2 into the same
> function. It is neither a Boost bug nor a compiler bug, just not
> particularly standard behavior.

Oh, well, it's a bug of the C++ implementation - we might as well say
it's a bug in the compiler even though it technically happens at link
time. Pointers to distinct functions are not allowed to compare
equal, even if most of their code gets folded.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at