Yes, although this is insignificant.
In this case, the C-style static_cast interpreted as static_cast , which may lead to adjustment of the pointer.
struct Base {}; struct Derived: Base { virtual ~Derived(); }
This overhead occurs when the underlying subobject does not align to the same address as the derived object, which occurs when:
- introduction of the first virtual method
- using multiple inheritance
Of course, adjusting the pointer is usually considered insignificant, and the compiler should be smart enough to exclude it if it is not needed in any case (setting 0).
Note: this is implementation dependent, not standard
source share