Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 19:31:53 -0800
From:      Mark Millard <marklmi26-fbsd@yahoo.com>
To:        svn-src-head@freebsd.org
Subject:   Re: svn commit: r328430 - head/sbin/devd
Message-ID:  <059B754A-3BBD-47F7-8DF4-B0277C1F385E@yahoo.com>

next in thread | raw e-mail | index | archive | help

Ian Lepore ian at freebsd.org wrote on
Fri Jan 26 16:56:09 UTC 2018 :

> Modern compilers will warn about a class with virtual functions and no
> virtual dtor, so just blindly including it is more harmful than
> prophylactic these days, IMO.

More reliable is to have non-virtual destructors be, say,
protected instead of public when possible. The language rules
then lead to issues that all the C++ compilers should report
violations of if a delete via a base-class pointer is
attempted in the source code.

I quoted a bit on the subject from the "C++ Coding Standards" book in:

https://lists.freebsd.org/pipermail/svn-src-head/2018-January/108976.html

===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?059B754A-3BBD-47F7-8DF4-B0277C1F385E>