
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? Thanks, -- Dave Abrahams Boost Consulting www.boost-consulting.com

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.

"Peter Dimov" <pdimov@mmltd.net> 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

David Abrahams wrote:
"Peter Dimov" <pdimov@mmltd.net> 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?
They are, no question about it. It's mostly a question of supporting MSVC 6-class compilers, and partially a question of dependencies (type_traits, for example). I suspect I can do much better in a hypothetical 100% TR1 bind that only targets 100% conforming compilers (and can freely use other TR1 libraries). But what would the point be? Isn't Lambda supposed to fill that role? ;-)

Peter Dimov <pdimov <at> mmltd.net> writes:
I suspect I can do much better in a hypothetical 100% TR1 bind that only targets 100% conforming compilers (and can freely use other TR1 libraries). But what would the point be? Isn't Lambda supposed to fill that role?
Maybe so, but in my recent experiences, even though error messages are bad, bind/mem_fn turns out to be generally *able* to solve the programming problems I encounter, whereas every time I've tried to apply lambda I've dropped it after running into a wall :( -Dave
participants (2)
-
David Abrahams
-
Peter Dimov