mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 06:00:13 +03:00
Fix Issue 15512 - Implement better C++ name mangling feature.
This commit is contained in:
parent
61fe641e9a
commit
d9747003d4
5 changed files with 94 additions and 14 deletions
25
test/compilable/cppmangle3.d
Normal file
25
test/compilable/cppmangle3.d
Normal 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");
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue