[Issue 15473] New: C++ mangling problem
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Dec 24 05:42:03 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15473
Issue ID: 15473
Summary: C++ mangling problem
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
C++ produces this symbol:
?asAssocArray at Variant@ep@@QEBA?AU?$SharedMap at U?$AVLTree at UVariant@ep@@U12 at U?$Compare at UVariant@ep@@@2@@ep@@@2 at XZ
D produces this symbol:
?asAssocArray at Variant@ep@@QEBA?AU?$SharedMap at U?$AVLTree at UVariant@ep@@0U?$Compare at UVariant@ep@@@2@@ep@@@2 at XZ
The difference is that little 'U12@' vs '0'. The MS linker de-mangles both
symbols to read identical, so I don't know what it means.
The C declaration:
namespace ep {
struct Variant
{
ep::SharedMap<ep::AVLTree<ep::Variant, ep::Variant,
ep::Compare<ep::Variant>>> asAssocArray() const;
};
} // namespace
The D declaration:
extern (C++, ep) {
struct Variant
{
SharedMap!(AVLTree!(Variant, Variant, Compare!Variant)) asAssocArray() const;
}
}
All those things are extern(C++, ep), and they work properly on their own.
--
More information about the Digitalmars-d-bugs
mailing list