[Issue 19248] New: Wrong mangle for C++ const STL classes/structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 15 09:23:48 UTC 2018


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

          Issue ID: 19248
           Summary: Wrong mangle for C++ const STL classes/structs
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ilyayaroshenko at gmail.com

================ C++
namespace std
{
    class vector
    {
    };
}

void bar(std::vector& a)
{

}

void foo(const std::vector& a)
{

}

----------------
_Z3barRSt6vector:
  rep ret

_Z3fooRKSt6vector:
  rep ret

================ D

extern(C++, std)
{
    extern(C++, class) struct vector
    {
    }
}

extern(C++):

void bar(ref std.vector)
{

}

void foo(ref const std.vector)
{

}

----------------
_Z3barRSt6vector: // OK
  ret

_Z3fooRKNSt6vectorE: // Wrong STD shortcuts 
  ret

--


More information about the Digitalmars-d-bugs mailing list