C++ Boost::函数错误‘;操作员[]和#x2019;

C++ Boost::函数错误‘;操作员[]和#x2019;,c++,function,boost,bind,C++,Function,Boost,Bind,我得到的全部错误是: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1, A2, A3, boost::arg<I> >::a4_ [with A1 = boost::_bi::value<MsgProxy*>, A2 = boost::arg<1>, A3 = boost::arg<2>, int I = 3]]’ 最后是正在

我得到的全部错误是:

error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1, A2, A3,     
boost::arg<I> >::a4_ [with A1 = boost::_bi::value<MsgProxy*>, A2 = boost::arg<1>, A3 = 
boost::arg<2>, int I = 3]]’
最后是正在调用的async_send函数:

void async_send        (t_socket_shptr, t_icsend_callback);
其中t_icsend_回调为:

typedef boost::function<void (t_socket_shptr, const boost::system::error_code&)> 
                                                              t_icsend_callback;
typedef boost::函数
t_icsend_回调;
基本上我有一个函数(async_send),它需要一个套接字来发送消息,
以及一个回调(使用boost::function定义)来异步报告状态。我试图将一个成员绑定到boost::function参数,但boost似乎不喜欢我在这里所做的工作。我对boost::function和boost:bind文档进行了上下转换,在我看来这应该是可行的。。。我甚至有一个几乎相同的电话,再往上一点也不会出错。。。颜色我被难住了。

t\u icsend\u回调是一个包含两个图形的函数

boost::bind(&MsgProxy::handle_dispatch, this, _1, _2, _3)
返回一个接受3个参数的函数

我想你想说

   message->async_send(*iter,
            boost::bind(&MsgProxy::handle_dispatch, this, message, _1, _2));

(注意“message”作为第一个有界参数)。

噢,狗娘养的,我应该看到的。谢谢你的鹰眼。对不起,我花了这么长时间才回复,我的拇指撞到了一把台锯,不得不绕道急诊室。
boost::bind(&MsgProxy::handle_dispatch, this, _1, _2, _3)
   message->async_send(*iter,
            boost::bind(&MsgProxy::handle_dispatch, this, message, _1, _2));