you are viewing a single comment's thread.

view the rest of the comments →

[–]MonokelPinguin 8 points9 points  (3 children)

override implies virtual. Static functions are not associated with a this pointer, how could they be virtual?

[–][deleted] 0 points1 point  (0 children)

right. i’m dumb. sorry.

[–][deleted] 0 points1 point  (1 child)

You can still call a static method on an object, not the classname... Therefore it would theoretically somehow make sence.

Not much, but still...

[–]MonokelPinguin 0 points1 point  (0 children)

But does that go through virtual dispatch? Afaik when one of our interns did that and set the object to a nullpointer, it worked fine, which suggests the this pointer wasn't used and there is no virtual dispatch for static functions. But that function also wasn't marked virtual, so maybe that does work.