Ok, so I'm aware of the typical reason people get the prototyped function not called
error. This is not that case
Consider the following class:
class FF {
public:
FF(float f):_f(f){}
float _f;
void DoSomething(float f) { _f = f; }
};
I attempt to construct an FF object using the following code which casts an int to a float. Note: I am working with legacy code here which uses this casting style - I know it is not the modern way.
int x = 0;
FF fTest(float(x));
VS2013 gives the warning :'FF fTest(float)': prototyped function not called (was a variable definition intended?)
Why does VS think this is a function prototype? FF only contains 1 constructor.
Interestingly, the same code format gives no warnings when used for calling functions on the object:
int x = 0;
FF fTest(0.f);
fTest.DoSomething(float(x));