jeudi 25 juin 2015

Inheritance and Compiler-Generated functions

When i have inheritance, does the compiler-generated functions that i usually get (constructor, destructor, assignment operator and copy constructor) are still generated for my classes?

Let's say i have this inheritance: A base class, B which inherits A (public) and C which public inherits B. My A class has no memory allocation or anything that requires a destructor to be implemented by me, and i'm not implementing a destructor there, when i compile my program will it still create an empty A::~A(){} ?

Same for B and C.. Thank you!

Aucun commentaire:

Enregistrer un commentaire