Warning C4430 not being thrown in friend declaration
class
myClass;class
otherClass{public
:otherClass(int x): valor(x){}
inlineint sum(myClass&obj);
private
:int valor;
};
class
myClass{public
:myClass(int x): val(x){}
friend otherClass::sum(myClass&);
private
:int val;
};
inline
int otherClass::sum(myClass&obj){return obj.val+ valor;
}
The above is a minimalist example to illustrate the problem at hand.
Note how the friend declaration is not defining the return type of otherClass::sum() and yet Warning C4430 is not being thrown.
Is this a bug? Or is there some compiler option I'm setting that precludes the warning?
This is my compiler's command line:
/Od /D "_WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MDd /Gy /Za /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W4 /nologo /c /Zi /TP /errorReport:prompt

