Simply because Derived
doesn't declare its own foo
, but rather inherits it from Base
. If you override (or shadow) it, the type will change to ... (Derived::*)(...)
.
This is sometimes useful in templates to detect if a certain function was overridden or not.