<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-07-20 23:52 GMT+09:00 Kenji Hara <span dir="ltr"><<a href="mailto:k.hara.pg@gmail.com" target="_blank">k.hara.pg@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>At least there's a dmd bug.</div><div><br></div><div>For such static array assignment, dmd should use druntime function, but instead plain memory copy operation used.</div><div><a href="https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2920" target="_blank">https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2920</a><br></div><div><a href="https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2945" target="_blank">https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L2945</a><br></div><div><br></div><div>And, even after the bug is fixed, I think it's debatable behavior whether an element-wise assignment should call opAssign on each elements, because it can be a kind of optimization.</div></div></blockquote><div><br></div><div>I filed a new wrong-code issue.</div><div><br></div><div><a href="https://issues.dlang.org/show_bug.cgi?id=14815">https://issues.dlang.org/show_bug.cgi?id=14815</a> </div><div><br></div><div>Kenji Hara </div></div></div></div>