【发布时间】:2015-05-24 15:44:18
【问题描述】:
我收到了这个错误
错误 5 错误 C2064:术语不计算为采用 2 个参数的函数 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap 431 1
尝试这样做之后
typedef std::function<int(int, int)> op;
op someOperator = std::plus<int>();
op someOtherOperator = std::minus<int>();
所以我可以调用类似的函数
UpdateValues(int X, int Y, op One, op Two)
{
//eventually doing something like
One(X, someOtherInt);
Two(Y, someOtherInt);
}
发生了什么事?
如果您需要,这里是我的文件的链接https://www.dropbox.com/s/vn2akcyb9f448e6/Checkers.rar?dl=0
【问题讨论】:
-
在ideone 上编译和运行。尝试发布一个重现该问题的最小示例。
-
所以在您发布的所有这些文件中,我们应该四处寻找无法编译的代码?