Commit 0006dcf
committed
Shut up warnings clang with libstdc++ emits about non-virt destructors
It complains a lot about non-final classes (structs) derived from
KVEntry having virtual functions but no virtual destructor, which in
std::optional code (that explicitly calls the destructor somewhere)
could theoretically lead to the wrong destructor being called (that of
the struct directly derived from KVEntry instead of the one of a
hypothetical class derived from that struct that might actually need
its destructor called).
This doesn't matter in practice because
1. those classes don't have any implemented constructors that need to
do anything
2. no further classes are derived from those that are derived from
KVEntry
So (I think!) these warnings are only hypothetical, but still annoying.
Apparently this does not happen if Clang uses libc++ or MSVCs C++ stdlib
(in the ClangCL case), but only with libstdc++, maybe even only with
libstdc++ from GCC14, but that's the only version I have on my machine.
fixes #10111 parent 504b962 commit 0006dcf
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
1849 | 1853 | | |
1850 | 1854 | | |
1851 | 1855 | | |
| |||
0 commit comments