[Issue 19260] New: extern(C++) `T* const` mangling
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 23 04:25:18 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19260
Issue ID: 19260
Summary: extern(C++) `T* const` mangling
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
This function:
void deallocate(T* const ptr, size_t count);
Is critical for linking STL, but I can't mangle the function.
D should obviously declare the function as:
void deallocate(T* ptr, size_t count);
Which is semantically identical in terms of usage, but the mangling of the
const pointer is different and therefore can't link.
What can we do?
I can't use pragma(mangle), because `T` is a template arg, and could be
anything!
This has stopped me in my tracks :/
--
More information about the Digitalmars-d-bugs
mailing list