C++ Logo

std-proposals

Advanced search

Re: Make abstract classes non-deletable if no virtual destructor available

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 23 Mar 2020 22:42:47 +0200
On Mon, 23 Mar 2020 at 22:35, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
>
> On Mon, 23 Mar 2020 at 22:30, Vishal Oza via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > I not sure if this should be an error or the compiler should generate the public virtual destuctor. I learn toward having the compiler generate the public virtual destuctor.
>
> No. The language should not guess intent and generate code based on
> one result of such guesses.
>
> The idea seems superficially valid to me.

..and clang and gcc already warn.

Received on 2020-03-23 15:45:48