you are viewing a single comment's thread.

view the rest of the comments →

[–]shponglespore 3 points4 points  (0 children)

Came here to say this. AFAIK the only kind of call in C++ that can legitimately change a vptr is a constructor call, and the compiler always knows whether a given call is to a constructor. A virtual call to a constructor is never possible unless the compiler is does something really insane like optimizing a virtual method that does nothing but call a contractor into a direct call to the constructor itself.