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: [email protected]
Reporter: [email protected]
C++ produces this symbol:
?asAssocArray@Variant@ep@@QEBA?AU?$SharedMap@U?$AVLTree@UVariant@ep@@U12@U?$Compare@UVariant@ep@@@2@@ep@@@2@XZ
D produces this symbol:
?asAssocArray@Variant@ep@@QEBA?AU?$SharedMap@U?$AVLTree@UVariant@ep@@0U?$Compare@UVariant@ep@@@2@@ep@@@2@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.
--