如何用不匹配的回调函数调试boost :: bind和boost :: signals2 :: signal :: connect错误?

时间:2016-01-08 10:55:19

标签: c++ boost

当您尝试connectsignal s类型不匹配的方法或函数时,会出现错误。问题是错误相当混乱,而且不是源于您的代码 - 因此,通过多次connect调用,我甚至无法判断哪一个导致了错误。

../libs/boost159/boost/function/function_template.hpp:159:57: error: no match for call to '(boost::_bi::bind_t<boost::_bi::unspecified, void (DataPoint::*)(DataPointMgr&, bool), boost::_bi::list2<boost::_bi::value<DataPoint*>, boost::arg<1> > >) (const std::basic_string<char>&)'
           BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));

所以,我不是要求某人解决我的具体问题。我想知道如何正确快速地解决这些错误,以便下次忘记星号或交换数据类型时,它不会花费20分钟来确定。

0 个答案:

没有答案