微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

c – 提升绑定编译错误

class A
{
   bool OutofRange(string& a,string& b,string c);
   void Get(vector <string>& str,string& a,string& b);
}

void A::Get(vector <string>& str,string& b)
{
   str.erase(
            std::remove_if (str.begin(),str.end(),BOOST_BIND(&A::OutOfRange,a,b,_1)),str.end()
            );
}

我收到的错误如下:

Error 7 error C2825: 'F': must be a class or namespace when followed by '::' File:bind.hpp
 Error 8 error C2039: 'result_type' : is not a member of '`global namespace'' t:\3rdparty\cpp\boost\boost-1.38.0\include\boost\bind.hpp 67

有人能告诉我我做错了什么吗?

解决方法

A :: OutOfRange是4个参数的函数 – 隐式*这是第一个参数,在bind子句中缺少

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐