Fix Issue 15512 - Implement better C++ name mangling feature.

This commit is contained in:
look-at-me 2018-09-06 22:24:34 -04:00
parent 61fe641e9a
commit d9747003d4
5 changed files with 94 additions and 14 deletions

View file

@ -0,0 +1,25 @@
extern(C++, "true")
{
}
extern(C++, "__traits")
{
}
extern(C++, "foo")
{
}
int foo; // no name clashing with above namespace
extern(C++, "std", "chrono")
{
void func();
}
version(Windows) static assert(func.mangleof == "?func@chrono@std@@YAXXZ");
else static assert(func.mangleof == "_ZNSt6chrono4funcEv");