|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-09 07:41:46
Daniel Boelzle wrote:
> Hello,
>
> I have problems using wonderful boost::bind with __cdecl member
> functions like the following:
>
> #include <boost/bind.hpp>
>
> struct S
> {
> void __cdecl foo( int );
> };
>
> void bar()
> {
> S s;
> int const n = 5;
> boost::bind( &S::foo, &s, _1 )( n );
> }
>
> ...
> error C2825: 'F::result_type': cannot form a qualified name
> ...
>
> I am using MSVC Version 13.10.3077 and boost 1.32.0.
This can only happen if your default calling convention is something other
than __cdecl. This is very rare and boost::bind does not provide explicit
support for __cdecl, relying on it being the default.
You can get around the restriction for non-member functions by using
bind<void>, but for member functions, since mem_fn does not have __cdecl
overloads, it can't be made to work with the current implementation.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net