B05-232 / plug-standard

0 stars 1 forks source link

Null virtual destructor #38

Closed DarkSoulEater closed 7 months ago

DarkSoulEater commented 7 months ago

It is necessary to make all virtual destructors equal to {}, and not = 0

DarkSoulEater commented 7 months ago

= default is bad too

MeerkatBoss commented 7 months ago

= default is bad too

Why though? It's the same as empty destructor, isn't it?

DarkSoulEater commented 7 months ago

= default is bad too

Why though? It's the same as empty destructor, isn't it?

I'm not sure if it's always like this. I think {} is clearer. Moreover, =default seemed to cause some kind of compilation error for me.

MeerkatBoss commented 7 months ago

I think this section says that default-ed destructor is exactly what we need - a destructor that performs no action. = default seems clearer for me, and it seems to be interchangeable with {}, so I think we can use both.