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)

_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to