boost::bind 不能处理函数重载 (error: no matching function for call to 'bind')
前言
最近任务多、工期紧,没有时间更新博客,就水一期吧。虽然是水,也不能太失水准,刚好最近工作中遇到一个 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<R>, 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<xxxxxxxxxxxxx>'
BOOST_BIND(boost::type<Rt2>, 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<xxxxxxxxxxxxx>'
BOOST_BIND(boost::type<Rt2>, 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<R>, 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<R>, 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<R>, 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<R>, 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<R>, 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<R>, 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<R>, 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<R>, 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<R>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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<Rt2>, 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 <iostream>
#include <functional>
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(<unresolved overloaded 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<class _Func, class ... _BoundArgs> typename std::_Bind_helper<std::__or_<std::is_integral<typename std::decay<_Tp>::type>, std::is_enum<typename std::decay<_Tp>::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<class _Result, class _Func, class ... _BoundArgs> 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?
boost::bind 不能处理函数重载 (error: no matching function for call to 'bind')的更多相关文章
- error: no matching function for call to 'std::exception:exception(const char[16])'
环境:codeblocks 语言:C++ 在执行:throw new exception("queue is empty.");时 遇到问题:error: no matching ...
- Error no matching function for call to 'std::exception::exception(const char [15])'
Error no matching function for call to 'std::exception::exception(const char [15])' Error 'logic_err ...
- Qt error ------ no matching function for call to QObject::connect(QSpinBox*&, <unresolved overloaded function type>, QSlider*&, void (QAbstractSlider::*)(int))
connect(ui->spinBox_luminosity,&QSpinBox::valueChanged, ui->horizontalSlider_luminosity, & ...
- error: no matching function for call to 'Ui::GoToCellDialog::setupUi(QDialog*&)' ui.setupUi(dialog); ^
环境:Qt5.3 参考书是:C++ GUI Qt4编程 问题描述: 按照书中的例子2-2做,编译时遇到的问题,从字面意思看是没有匹配的函数可用,UI::GotoCellDialog类是自动生成的,所以 ...
- JavaScript 没有函数重载&Arguments对象
对于学过Java的人来说.函数重载并非一个陌生的概念,可是javaScript中有函数重载么...接下来我们就进行測试 <script type="text/javascript&qu ...
- 【ERROR】no matching function for call to 'std::basic_ifstream<char>::basic_ifstream
错误记录:QT中使用 no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(QString ...
- 以boost::function和boost:bind取代虚函数
转自:http://blog.csdn.net/Solstice/archive/2008/10/13/3066268.aspx 这是一篇比较情绪化的blog,中心思想是“继承就像一条贼船,上去就下不 ...
- boost::function和boost:bind取代虚函数
以boost::function和boost:bind取代虚函数 这是一篇比较情绪化的blog,中心思想是"继承就像一条贼船,上去就下不来了",而借助boost::function ...
- javascript 函数重载 overloading
函数重载 https://en.wikipedia.org/wiki/Function_overloading In some programming languages, function over ...
随机推荐
- js手机端判断滑动还是点击
网上的代码杂七杂八, 我搞个简单明了的!! 你们直接复制粘贴, 手机上 电脑上 可以直接测试!!! 上图: 上代码: <!DOCTYPE html> <html lang=&q ...
- 时间篇之linux系统时间和RTC时间
一.linux系统下包含两个时间:系统时间(刚启动时读取的是rtc时间)和RTC时间. 一般情况下都会选择芯片上最高精度的定时器作为系统时间的定时基准,以避免在系统运行较长时间后出现大的时间偏移.特点 ...
- SLF4J (The Simple Logging Facade for Java)使用记录
SLF4J (The Simple Logging Facade for Java)使用记录 官网 http://www.slf4j.org/ 参考资料 官方文档 什么是 SLF4J? 官网: The ...
- PostgreSQL安装 报there has been an error.Error running
直接用postgresql-11.2-1:https://get.enterprisedb.com/postgresql/postgresql-11.2-1-windows-x64.exe这个版本的安 ...
- 以ARM和RISC-V为内核的单片机写寄存器
我以为这是个很简单的问题,没想到还有一些初学者不会.可能他们也是跟我一样是直接学的如何操作单片机并没有学微机原理么. ARM和RISC-V的机器的系统架构都是哈佛结构的,意思是程序存储器.数据存储器和 ...
- Solon 1.6.36 发布,更现代感的应用开发框架
相对于 Spring Boot 和 Spring Cloud 的项目 启动快 5 - 10 倍 qps 高 2- 3 倍 运行时内存节省 1/3 ~ 1/2 打包可以缩小到 1/2 ~ 1/10(比如 ...
- Python生成短uuid的方法
python的uuid都是32位的,比较长,处理起来效率比较低, 本算法利用62个可打印字符,通过随机生成32位UUID,由于UUID都为十六进制,所以将UUID分成8组,每4个为一组,然后通过模62 ...
- python基础练习题(题目 取一个整数a从右端开始的4〜7位。)
day36 --------------------------------------------------------------- 实例054:位取反.位移动 题目 取一个整数a从右端开始的4 ...
- 《手把手教你》系列基础篇(九十)-java+ selenium自动化测试-框架设计基础-Logback实现日志输出-中篇(详解教程)
1.简介 上一篇宏哥介绍是如何使用logback将日志输出到控制台中,但是如果需要发给相关人需要你拷贝出来,有时候由于控制台窗口的限制,有部分日志将会无法查看,因此我们还是需要将日志输出到文件中,因此 ...
- 动态规划 Dynamic Programming 学习笔记
文章以 CC-BY-SA 方式共享,此说明高于本站内其他说明. 本文尚未完工,但内容足够丰富,故提前发布. 内容包含大量 \(\LaTeX\) 公式,渲染可能需要一些时间,请耐心等待渲染(约 5s). ...