boost::bind 不能处理函数重载 (error: no matching function for call to ‘bind’)

虚幻大学 xuhss 143℃ 0评论

? 优质资源分享 ?

学习路线指引(点击解锁) 知识定位 人群定位
? Python实战微信订餐小程序 ? 进阶级 本课程是python flask+微信小程序的完美结合,从项目搭建到腾讯云部署上线,打造一个全栈订餐系统。
?Python量化交易实战? 入门级 手把手带你打造一个易扩展、更安全、效率更高的量化交易系统

前言

最近任务多、工期紧,没有时间更新博客,就水一期吧。虽然是水,也不能太失水准,刚好最近工作中遇到一个 boost::bind 的问题,花费了半天时间来定位解决,就说说它吧。

问题背景

项目中使用了 boost 的 ios_service,任务都是 post 到对应线程去执行,这样可以避免复杂的多线程同步问题,有点类似早年间 COM 的单线程套间模型。不过这就需要将接口通过 bind 封装为函数对象传递给 ios_service,之前的代码都工作正常,但我新增了一个接口后,却怎么也编译不过,报下面的错误 (超长内容,展开谨慎):

查看代码

jni/../../Task/jni/../jni/../../xxxx/jni/../xxxx_xxxxxxxxx.cpp:3414:48: error: no matching function for call to 'bind'
        xxxxxxxxxxx::instance()->getIOS().post(boost::bind(&xxxxxxxxxxxxx::create_task, 
                                               ^~~~~~~~~~~
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1907:5: note: candidate template ignored: couldn't infer template argument 'R'
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1981:5: note: candidate template ignored: couldn't infer template argument 'R'
    BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2073:5: note: candidate template ignored: couldn't infer template argument 'F'
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:57:5: note: candidate template ignored: couldn't infer template argument 'R'
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:161:5: note: candidate template ignored: couldn't infer template argument
 'R'
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:172:5: note: candidate template ignored: couldn't infer template argument
 'R'
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:184:13: note: candidate template ignored: couldn't infer template argument
 'Rt2'
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:196:13: note: candidate template ignored: couldn't infer template argument
 'Rt2'
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:68:5: note: candidate template ignored: could not match
 'R (T::*)(B1, B2)' against 'boost::shared\_ptr'
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:79:5: note: candidate template ignored: could not match
 'R (T::*)(B1, B2) const' against 'boost::shared\_ptr'
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1875:5: note: candidate function template not viable: requires single argument
 'f', but 5 arguments were provided
 BOOST\_BIND(F f)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1883:5: note: candidate function template not viable: requires 2 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1891:5: note: candidate function template not viable: requires 3 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1899:5: note: candidate function template not viable: requires 4 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1915:5: note: candidate function template not viable: requires 6 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1923:5: note: candidate function template not viable: requires 7 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1931:5: note: candidate function template not viable: requires 8 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1939:5: note: candidate function template not viable: requires 9 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1947:5: note: candidate function template not viable: requires 10 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1957:5: note: candidate function template not viable: requires 2 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1965:5: note: candidate function template not viable: requires 3 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1973:5: note: candidate function template not viable: requires 4 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1989:5: note: candidate function template not viable: requires 6 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1997:5: note: candidate function template not viable: requires 7 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2005:5: note: candidate function template not viable: requires 8 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2013:5: note: candidate function template not viable: requires 9 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2021:5: note: candidate function template not viable: requires 10 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2029:5: note: candidate function template not viable: requires 11 arguments, but
 5 were provided
 BOOST\_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2041:5: note: candidate function template not viable: requires single argument
 'f', but 5 arguments were provided
 BOOST\_BIND(F f)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2049:5: note: candidate function template not viable: requires 2 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2057:5: note: candidate function template not viable: requires 3 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2065:5: note: candidate function template not viable: requires 4 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2081:5: note: candidate function template not viable: requires 6 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2089:5: note: candidate function template not viable: requires 7 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2097:5: note: candidate function template not viable: requires 8 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2105:5: note: candidate function template not viable: requires 9 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2113:5: note: candidate function template not viable: requires 10 arguments, but
 5 were provided
 BOOST\_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:17:5: note: candidate function template not viable: requires single argument
 'f', but 5 arguments were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) () BOOST\_BIND\_NOEXCEPT)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:26:5: note: candidate function template not viable: requires 2 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1) BOOST\_BIND\_NOEXCEPT, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:35:5: note: candidate function template not viable: requires 3 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:46:5: note: candidate function template not viable: requires 4 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:68:5: note: candidate function template not viable: requires 6 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4, B5) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:79:5: note: candidate function template not viable: requires 7 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4, B5, B6) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:90:5: note: candidate function template not viable: requires 8 arguments, but
 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4, B5, B6, B7) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:101:5: note: candidate function template not viable: requires 9 arguments,
 but 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, ...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_cc.hpp:112:5: note: candidate function template not viable: requires 10 arguments,
 but 5 were provided
 BOOST\_BIND(BOOST\_BIND\_ST R (BOOST\_BIND\_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST\_BIND\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 ...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:20:5: note: candidate function template not viable: requires 2 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) () BOOST\_BIND\_MF\_NOEXCEPT, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:30:5: note: candidate function template not viable: requires 2 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) () const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:41:13: note: candidate function template not viable: requires 2 arguments,
 but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) () BOOST\_BIND\_MF\_NOEXCEPT, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:52:13: note: candidate function template not viable: requires 2 arguments,
 but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) () const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:65:5: note: candidate function template not viable: requires 3 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:76:5: note: candidate function template not viable: requires 3 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:88:13: note: candidate function template not viable: requires 3 arguments,
 but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:100:13: note: candidate function template not viable: requires 3
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:113:5: note: candidate function template not viable: requires 4 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:124:5: note: candidate function template not viable: requires 4 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:136:13: note: candidate function template not viable: requires 4
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:148:13: note: candidate function template not viable: requires 4
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:209:5: note: candidate function template not viable: requires 6 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:220:5: note: candidate function template not viable: requires 6 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:232:13: note: candidate function template not viable: requires 6
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:244:13: note: candidate function template not viable: requires 6
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:257:5: note: candidate function template not viable: requires 7 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:268:5: note: candidate function template not viable: requires 7 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:280:13: note: candidate function template not viable: requires 7
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:292:13: note: candidate function template not viable: requires 7
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:305:5: note: candidate function template not viable: requires 8 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:316:5: note: candidate function template not viable: requires 8 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:328:13: note: candidate function template not viable: requires 8
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:340:13: note: candidate function template not viable: requires 8
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:353:5: note: candidate function template not viable: requires 9 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:364:5: note: candidate function template not viable: requires 9 arguments,
 but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 ...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:376:13: note: candidate function template not viable: requires 9
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:388:13: note: candidate function template not viable: requires 9
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:401:5: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:412:5: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:424:13: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf\_cc.hpp:436:13: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 >::type BOOST\_BIND(R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST\_BIND\_MF\_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:21:5: note: candidate function template not viable: requires 3 arguments,
 but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (), A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:31:5: note: candidate function template not viable: requires 3 arguments,
 but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) () const, A1 a1)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:44:5: note: candidate function template not viable: requires 4 arguments,
 but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1), A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:55:5: note: candidate function template not viable: requires 4 arguments,
 but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1) const, A1 a1, A2 a2)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:92:5: note: candidate function template not viable: requires 6 arguments,
 but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:103:5: note: candidate function template not viable: requires 6
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:116:5: note: candidate function template not viable: requires 7
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:127:5: note: candidate function template not viable: requires 7
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:140:5: note: candidate function template not viable: requires 8
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:151:5: note: candidate function template not viable: requires 8
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:164:5: note: candidate function template not viable: requires 9
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:175:5: note: candidate function template not viable: requires 9
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:188:5: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:199:5: note: candidate function template not viable: requires 10
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:212:5: note: candidate function template not viable: requires 11
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 ...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind\_mf2\_cc.hpp:223:5: note: candidate function template not viable: requires 11
 arguments, but 5 were provided
 BOOST\_BIND(boost::type, R (BOOST\_BIND\_MF\_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a...
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:2342:1: note: candidate function template not viable: requires 2 arguments, but
 5 were provided
BOOST\_BIND( M T::*f, A1 a1 )
^
jni/../../Task/jni/../../../third-party/boost/include/boost/bind/bind.hpp:1868:20: note: expanded from macro 'BOOST\_BIND'
#define BOOST\_BIND bind
 ^
1 error generated.

错误看着挺唬人,其实关键的就是第一句:

jni/../../Task/jni/../jni/../../xxxx/jni/../xxxx_xxxxxxxxx.cpp:3414:48: error: no matching function for call to 'bind'
        xxxxxxxxxxx::instance()->getIOS().post(boost::bind(&xxxxxxxxxxxxx::create_task, 
                                               ^~~~~~~~~~~

boost::bind create_task 这个接口时出错了,百度了下这个错误,网上比较多的说法是 bind 给的参数和接口声明不一致,可是仔细检查了三遍参数,都没有发现问题,甚至把 post 改成直接调用的形式,这个就可以通过编译,真是神了~

另外查资料的过程中,发现 bind 最多支持 9 个参数,超过就不行了。不过在我的场景里,只有 4 个参数,所以也不是这方面的问题,可以排除。

排查过程

为了简化问题的排查过程,排除其它因素干扰,我写了一个简单例子:

#include 
#include  

using namespace std; 

int create\_task(int);
int create\_task(int, int);

int main(int argc, char* argv[])
{
    auto f1 = bind(create_task, 1, 2); 
    f1(); 
    return 0; 
}

int create\_task(int a)
{
    cout << "create\_task (" << a << ") called" << endl; 
    return 0; 
} 

int create\_task(int a, int b)
{
    cout << "create\_task (" << a << ", " << b << ") called" << endl; 
    return 0; 
}

这里使用了 std bind 而不是 boost bind,不过一样可以复现出错场景,同时避免引入 boost 静态库导致 demo 太过复杂:

$ make
g++ -Wall -g -c bindemo.cpp -o bindemo.o -std=c++11
bindemo.cpp: In function ‘int main(int, char**)’:
bindemo.cpp:11:37: error: no matching function for call to ‘bind(function type>, int, int)’
 auto f1 = bind(create\_task, 1, 2); 
 ^
bindemo.cpp:11:37: note: candidates are:
In file included from bindemo.cpp:2:0:
/usr/include/c++/4.8.2/functional:1655:5: note: template typename std::\_Bind\_helper::type>, std::is\_enum::type> >::value, \_Func, \_BoundArgs ...>::type std::bind(\_Func&&, \_BoundArgs&& ...)
 bind(\_Func&& \_\_f, \_BoundArgs&&... \_\_args)
 ^
/usr/include/c++/4.8.2/functional:1655:5: note: template argument deduction/substitution failed:
bindemo.cpp:11:37: note: couldn't deduce template parameter ‘\_Func’
 auto f1 = bind(create\_task, 1, 2); 
 ^
In file included from bindemo.cpp:2:0:
/usr/include/c++/4.8.2/functional:1682:5: note: template typename std::\_Bindres\_helper<\_Result, \_Func, \_BoundArgs>::type std::bind(\_Func&&, \_BoundArgs&& ...)
 bind(\_Func&& \_\_f, \_BoundArgs&&... \_\_args)
 ^
/usr/include/c++/4.8.2/functional:1682:5: note: template argument deduction/substitution failed:
bindemo.cpp:11:37: note: couldn't deduce template parameter ‘\_Result’
 auto f1 = bind(create\_task, 1, 2); 
 ^
make: *** [bindemo.o] Error 1

其实看了这个 demo,很多人都会怀疑一个问题——是不是重载的 create_task 出了问题呢?确实如此,其实我只要将另一个 create_task 的声明注释掉 (实现仍保留),这个 demo 就可以编译通过了,运行效果如下:

$ ./bindemo
create_task (1, 2) called

不过我在当初查这个问题的时候可是费了九牛二虎之力,因为参数使用了引用类型,一开始怀疑是引用的锅,直接使用指针,不行;然后怀疑是没有为引用参数添加 boost::ref,也不行;最后直接把 bind 接口改成另外一个成员函数 (start_task),无意中居然通过了。不过此时我仍怀疑是参数的问题,于是增加了一个同名的函数重载,参数照抄 create_task,结果就失败了;最神奇的是改为之前那版 start_task 也不行了,这才开始怀疑是函数重载的问题。

解决方案

知道了问题原因,改起来就比较顺了,因为新版的 create_task 增加了一个结构体作为参数,于是干脆将它重命名为 create_task_param,这样再绑定就没有问题了。

后记

问题虽然解决了,但是 bind 为何对重载函数如此“无能为力”呢?按理说根据提供给 bind 的参数,再匹配重载函数的参数列表,应该可以挑选正确的重载版本。

不过换个角度思考,bind 支持占位符,上面的例子中,我可以这样写:

int main(int argc, char* argv[])
{
    auto f1 = bind(create_task, 1, 2); 
    f1(); 
    auto f2 = bind(create_task, placeholders::_1, 0); 
    f2(3); 
    return 0; 
}

其中 f2 有一个参数使用了占位符,这个参数将在调用时才传递,而 bind 需要在绑定那一刻知道使用的是哪个版本的 create_task,针对这个例子,他只有一个两参数的版本可选,但如果有多个两参数且第二参数为 int 类型的重载版本的话,bind 就迷糊了,毕竟他不知道后面用户会给占位符传递什么类型的参数不是?所以我猜测为了避免类似的问题,c++ 干脆不让 bind 支持重载函数,直接出错了事,编译期错误总比运行期错误好解决,你觉得呢?

当然,比较迷的是,这里只有一个两参数的版本,bind 仍然报错了,这是够懒的。另外有些网上的文章说 (附录 4),bind 会挑选重载函数中第一个声明的版本,如果通过就通过,如果不通过就报错。但是我实际测试的情况是,无论将两参数的版本放在前面还是后面,都报错,除非不声明,看起来我这个 gcc 版本是严格执行了 c++ 标准滴~

参考

[1]. boost::bind对引用的特殊处理_hacker_lpy的博客-CSDN博客

[2]. Boost::bind使用详解 - jackjoe - 博客园

[3]. 关于std::function和std::bind绑定成员函数

[4]. boost::bind with overloaded functions?

[5]. 使用boost::bind和重载函数的访客模式

转载请注明:xuhss » boost::bind 不能处理函数重载 (error: no matching function for call to ‘bind’)

喜欢 (0)

您必须 登录 才能发表评论!