www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17947] New: C++ std::pair::swap mangled incorrectly

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

          Issue ID: 17947
           Summary: C++ std::pair::swap mangled incorrectly
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

This assert fails:

  extern (C++, std) {
    struct pair(T1, T2) {
        void swap(ref pair other);
    }
  }

  version (linux) {
    static assert(std.pair!(void*, void*).swap.mangleof ==
        "_ZNSt4pairIPvS0_E4swapERS1_");
  }

because it is incorrectly mangled as:

  "_ZNSt4pairIPvS1_E4swapERStS0_IS1_S1_E"

--
Oct 29