Say I have the following:
struct Base
{
virtual void callback() { /* */ }
};
struct Derived : public Base
{
void callback() { /* */ }
};
Base* obj = new Derived;
static_cast<Derived*>(obj)->callback();
Will the call to callback invoke via the vtable or a straight function call as it's not marked as virtual in the function signature?