Boost logo

Boost Users :

Subject: [Boost-users] [bind?] 'boost::bind' : ambiguous call to overloaded function -- when compiling for x64
From: Igor R (boost.lists_at_[hidden])
Date: 2012-03-08 16:12:52


Hello,

My project builds well with MSVC10 for x86 platform. However, when I
tried to build it for x64, I started to get the following strange
error:

1>...cpp(42): error C2668: 'boost::bind' : ambiguous call to overloaded function
1> ...\boost\boost/bind/bind_mf_cc.hpp(43): could be
'boost::_bi::bind_t<R,F,L> boost::bind<void,MyImpl,const
boost::system::error_code&,boost::shared_ptr<T>,boost::system::error_code>(R
(__cdecl MyImpl::* )(B1),A1,A2)'
<...>
1> ...\boost\boost/bind/bind_mf_cc.hpp(43): or
'boost::_bi::bind_t<R,F,L> boost::bind<void MyImpl,const
boost::system::error_code&,boost::shared_ptr<T>,boost::system::error_code>(R
(__cdecl MyImpl::* )(B1),A1,A2)'

Note that the both variants are actually the same one.

The source line that causes the error looks like this:
io_service_.post(boost::bind(&MyImpl::func, someSharedPtr));
i.e. boost::bind name is fully qualified.

Unfortunately, I can't reproduce this error in a "fresh" trivial
project, so I realize that the problem most likely isn't in Bind, but
somewhere in my project. The question is what could cause such a
behavior? Did anyone encounter such an issue?

Thanks.


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