Bug 19160 – wrong C++ mangle for const template args

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2018-08-12T06:18:54Z
Last change time
2018-08-17T08:09:00Z
Keywords
C++, mangling
Assigned to
No Owner
Creator
Илья Ярошенко

Comments

Comment #0 by ilyayaroshenko — 2018-08-12T06:18:54Z
extern(C++, std) extern(C++, struct) struct pair(T1, T2) { alias first_type = T1; alias second_type = T2; T1 first; T2 second; } extern(C++) void foo(pair!(const double, double) p) { } mangles to: void __cdecl foo(struct std::pair<double,double>) expected: void __cdecl foo(struct std::pair<const double,double>) This issue is blocker for std::map integration.
Comment #1 by iamthewilsonator — 2018-08-17T01:51:28Z
What DMDFE version are you using? I'm pretty sure I fixed this in https://github.com/dlang/dmd/pull/8432
Comment #2 by ilyayaroshenko — 2018-08-17T02:08:08Z
(In reply to Nicholas Wilson from comment #1) > What DMDFE version are you using? I'm pretty sure I fixed this in > https://github.com/dlang/dmd/pull/8432 LDC beta with DMDFE 2.081.1
Comment #3 by iamthewilsonator — 2018-08-17T04:53:44Z
https://github.com/dlang/dmd/pull/8432 is not part of 2.081.1 or 2.081.2. It is however part of 2.082.beta-1. Try with DMD 2.082.beta-1 or newer, confirm if it works. If so we can cherry pick this onto LDC. If not I've got more fixing to do!
Comment #4 by ilyayaroshenko — 2018-08-17T08:08:18Z
(In reply to Nicholas Wilson from comment #3) > https://github.com/dlang/dmd/pull/8432 is not part of 2.081.1 or 2.081.2. It > is however part of 2.082.beta-1. > > Try with DMD 2.082.beta-1 or newer, confirm if it works. If so we can cherry > pick this onto LDC. If not I've got more fixing to do! Thanks, it is fixed!
Comment #5 by ilyayaroshenko — 2018-08-17T08:08:27Z
(In reply to Nicholas Wilson from comment #3) > https://github.com/dlang/dmd/pull/8432 is not part of 2.081.1 or 2.081.2. It > is however part of 2.082.beta-1. > > Try with DMD 2.082.beta-1 or newer, confirm if it works. If so we can cherry > pick this onto LDC. If not I've got more fixing to do! Thanks, it is fixed!