Commit 7d2ca37
committed
tests: Work around gcc12 bug with c++20 edge cases
There are multiple tests that, with gcc 12, get an ambiguous overload
error, with the basic problem being multiple inheritance paths.
Somehow, c++20 requires that this work, and gcc 13 accepts the code.
(clang 15 also rejects this code, and clang 16 is ok).
Because the point is to test qgis, not compiler conformance, and
because this overload pattern does not appear in the codebase (it
would error if it did), downcast one side of the comparison to the
base class to avoid the error. Analysis and fix suggestion are due to
Even Rouault.
credit to @gdt for original commit1 parent a624b45 commit 7d2ca37
File tree
4 files changed
+16
-8
lines changed- tests/src/core/geometry
4 files changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
| 956 | + | |
| 957 | + | |
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
375 | 383 | | |
376 | | - | |
377 | | - | |
| 384 | + | |
| 385 | + | |
378 | 386 | | |
379 | 387 | | |
380 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
0 commit comments