You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Triggers a compile-error if base::foo changes signature or is not virtual anymore.
override
Can be used for destructors too
structbase{
virtual~base();
};
structderived : base {
~derived() override;
};
As destructors cannot change signature, the advantage in this case is that in case ~base() is not virtual anymore, instead of triggering UB, it’s a compiler error.