NoAvailableAlias / nano-signal-slot

Pure C++17 Signals and Slots
MIT License
407 stars 60 forks source link

virtual dtor in Nano::Observer? #19

Closed offa closed 6 years ago

offa commented 8 years ago

The dtor of Nano::Observer is not virtual – shouldn't it be virtual?

Enabling Weffc++ for classes which inherit from Observer emit following warning (Gcc6):

error: base class ‘class Nano::Observer’ has accessible non-virtual destructor [-Werror=non-virtual-dtor]
NoAvailableAlias commented 6 years ago

Nano::Observer destructor should not be accessible due to being protected. I believe that alone is enough.