Fix C++ declarations causing link errors#1421
Fix C++ declarations causing link errors#1421rainers wants to merge 1 commit intoldc-developers:merge-2.071from
Conversation
|
( It'd be so nice if someone would write a C++-D interop checker tool, to check that the C++ headers and D declarations are the same. :) As a start, just a tool to check class and vtable sizes would catch these tricky to find errors. ) |
This would not find the issue in this PR as it introduced a non-virtual member function. |
Was commenting on that. |
It pretty much works: dlang/dmd#5082 |
Looks pretty good. From reading funcToBuffer, it seems const modifiers on member functions are not emitted, so overrides are ok, but mangling is not. |
|
I created a PR for dmd: dlang/dmd#5673 |
This has been merged. Is it ok to cherry-pick this into the merge-2.071 branch? |
Yes! |
|
Yes, of course it is. Feel free to play it "fast and loose" with the |
These are the symbols that caused actual link errors on Windows, but there are actually a lot more places in the headers that are wrong (i.e. adding const to an override does not override in C++, but creates a new vtable slot (if virtual)). This should be fixed in general upstream.