../../../include/compiletargetbase.h:133: warning: ‘virtual void CompileTargetBase::SetTargetType(TargetType)’ was hidden
../../../include/projectbuildtarget.h:105: warning: by ‘virtual void ProjectBuildTarget::SetTargetType(const TargetType&)’
-Woverloaded-virtual (C++ and Objective-C++ only)
Warn when a function declaration hides virtual functions from a base class. For example, in:
struct A {
virtual void f();
};
struct B: public A {
void f(int);
};
the "A" class version of "f" is hidden in "B", and code like:
B* b;
b->f();
will fail to compile.
I think the issue is really that these are not overloaded virtual functions at all, since one passes the parameter by value and the other passes the parameter by const reference.There are also functions with different number of parameters.
However, that would mean that we break the SDK's interface (which we agreed on some 1-1.5 years ago shouldn't be done). Yiannis?IIRC we agreed not to break in in the release branches (08/02 and 10/05), but in trunk I'm afraid we have already several times, not to mention the developer branches.
There are also functions with different number of parameters.Well yes, obviously, and that's nothing to worry about.
Also there are virtual operator= which are totally wrong (search google for info)While I'm not sure how it makes sense to overload the assignment operator, I don't see a real hindrance to doing that. After all, operator= is just a function, like every other function. In fact, SetTargetType could be thought of a kind of "partial" operator=.