c++ - Vptr with default constructors vs explicitly declared constructors -



c++ - Vptr with default constructors vs explicitly declared constructors -

the compiler inserts code origin of constructor initializes vptr. operation influenced whether constructor default 1 or explicitly declared? there difference between two?

it inserted, has polymorphism work, @ to the lowest degree way compilers typically have implemented. initialized always, constructors declare (or don't declare) irrelevant.

or, hey, maybe won't (although not know compilers behave way), you need care polymorphism works, , work no matter constructors have declared.

c++ polymorphism vptr

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -