https://issues.dlang.org/show_bug.cgi?id=19783
Issue ID: 19783 Summary: Fail to emplace struct with betterC Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: kuett...@gmail.com When trying to emplace a struct with dmd -betterC, a linker reports a missing symbol. The program import core.stdc.stdlib; import std.conv; struct TestStruct { int i; } extern (C) int main(size_t argc, char** argv) { enum size = TestStruct.sizeof; auto buf = malloc(size); scope(exit) free(buf); auto r = emplace!TestStruct(buf[0 .. size]); return 0; } Leads to betterc_2.o: In function `_D3std4conv__T7emplaceTS9betterc_210TestStructZQBhFNaNbNiAvZPQBm': betterc_2.d:(.text._D3std4conv__T7emplaceTS9betterc_210TestStructZQBhFNaNbNiAvZPQBm[_D3std4conv__T7emplaceTS9betterc_210TestStructZQBhFNaNbNiAvZPQBm]+0x24): undefined reference to `_D3std4conv16testEmplaceChunkFNaNbNiNfAvmmZv' Without -betterC it works just fine. --