|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-03-13 14:28:02
"Peter Dimov" <pdimov_at_[hidden]> writes:
> David Abrahams wrote:
>> I keep getting lots of these:
>>
>> c:\boost\boost\mem_fn.hpp(264) : warning C4180: qualifier applied to
>> function type has no meaning; ignored
>>
>> Would it be possible for the mem_fn header to #pragma push a warning
>> disabler for MSVC?
>
> These warnings are probably a sign that the data member mem_fn/bind overload
> is being picked instead of the correct member function overload. They
> usually indicate a bug in your code. For example, you've used bind(&X::f,
> _1) but &X::f doesn't take zero arguments.
Wow, so they are! I was getting other errors, and when I fixed those
the warnings disappeared too.
Incidentally, the errors I get when I misuse bind somehow (which
happens frequently!) are *really* bad at telling me what I've done
wrong. Any chance of improving those?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk