C++ Logo


Advanced search

Subject: Re: [std-proposals] Make abstract classes non-deletable if no virtual destructor available
From: Kilian Henneberger (kilis-mail_at_[hidden])
Date: 2020-03-24 13:24:43

Both, making the automatically generated destructor protected (how you
would word it) and making the delete call ill-formed would lead to the
same result.
Personally I do not see any advantage of one over the other.

Am 23.03.2020 um 23:24 schrieb Henry Miller via Std-Proposals:
> I would word this as if there are any pure virtual functions the automatically generated destructor is protected. It gives the result you want by default, anyone who wants the virtual destructor already has to declare it. And if there really is a reason to have a non virtual public destructor it should be verbose enough to call attention to that unusual situation.

STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups