[Issue 18954] New: extern(C++) ICE when `cppmangle` is used
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 8 04:19:59 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18954
Issue ID: 18954
Summary: extern(C++) ICE when `cppmangle` is used
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
test.d:
--------------------------------------------------------------
extern (C++, std)
{
extern (C++, class) struct allocator(T)
{
}
extern (C++, struct) struct char_traits(Char)
{
}
extern (C++, class) struct basic_string(T, Traits, Alloc)
{
}
alias string = basic_string!(char, char_traits!char, allocator!char);
}
extern (C++) void test(ref const(std.string) str) {}
--------------------------------------------------------------
The problem is instantiating basic_string!(...)
`basic_string` is mangled as a class, but char_traits is mangled as a struct.
When instantiating basic_string with char_traits as an argument, it triggers an
assert in a weird bit of code insisting that the mangle types be the same (but
they're not)
--
More information about the Digitalmars-d-bugs
mailing list