www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19160] New: wrong C++ mangle for const template args

https://issues.dlang.org/show_bug.cgi?id=19160

          Issue ID: 19160
           Summary: wrong C++ mangle for const template args
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

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.

--
Aug 11 2018