Error 5 error C2064: term does not evaluate to a function taking 2 arguments C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap 431 1
after trying to do this
1 2 3 4
typedef std::function<int(int, int)> op;
op someOperator = std::plus<int>();
op someOtherOperator = std::minus<int>();
so I can call a function like
1 2 3 4 5 6
UpdateValues(int X, int Y, op One, op Two)
{
//eventually doing something like
One(X, someOtherInt);
Two(Y, someOtherInt);
}
You were right, the problem was somewhere else! Thanks a lot for your answer, in the end there were three separate things that kept generating that error:
I was passing an op object in place of a bool parameter
I was passing an op* object in place of an op parameter
I was passing an op object in place of an op* paramater