Can the default destructor be generated as a virtual destructor automatically?

c++, destructor

Solution

No. There is a cost associated with making a method virtual, and C++ has a philosophy of not making you pay for things that you don't explicitly state that you want to use. If a virtual destructor would have been generated automatically, you would have been paying the price automatically.

Why not just define an empty virtual destructor?

Problem

Can the default destructor be generated as a virtual destructor automatically? If I define a base class but no default destructor, is there a default virtual destructor generated automatically?

Original source