Commit fbb5412
authored
Shut up warnings clang with libstdc++ emits about non-virtual destructors (#1012)
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 b9218bc commit fbb5412
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
61 | 83 | | |
62 | 84 | | |
63 | 85 | | |
| |||
| 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