https://issues.dlang.org/show_bug.cgi?id=14912
--- Comment #5 from Iain Buclaw <ibuc...@gdcproject.org> --- (In reply to Steven Schveighoffer from comment #3) > Wouldn't it be enough to simply change the call to the opaque function > _d_newitemT(TypeInfo ti) to a template _d_newitem!(T)() ? > > I don't want to put more special code in the compiler if possible. Not really, because any potential optimization would stop at the memcpy, and not go any further. I don't see what the complaint is? The compiler has a much better idea of what is going on when it comes to initializing structures efficiently vs. a memcpy which is non-inlineable, and almost always falls into the slow, unaligned code path. --