Hi, On 14.07.2016 16:17, Mark Roszko wrote:
> If you put virtual blah() in struct C without override, you can be
> creating a new virtual function if the signature does not match and
> its completely valid.
Right, but that is something we can catch with "override".
The reason I like to have them there, besides having it immediately
visible, is the case
struct A {
virtual void foo();
};
struct B : A {
void foo();
};
struct C : B {
void foo();
};
{
B *b = new C;
b->foo();
}
This calls C::foo(), until the signature of A::foo() changes, then it
starts calling B::foo().
Simon
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

