<div class="gmail_quote">On Sat, Oct 22, 2011 at 9:49 PM, Andrej Mitrovic <span dir="ltr"><<a href="mailto:andrej.mitrovich@gmail.com">andrej.mitrovich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

It's because the function is small enough to be inlineable, you can't<br>
inline it if you've only got the prototype in the header file. So it's<br>
optimizations at play.<br>
</blockquote></div><br><div>Interestingly, it looks like GNU ld should be able to inline functions as part of link time optimizations, which would make this unnecessary on platforms where DMD uses ld. Probably not worth looking into right now, but if di files become more used in the future, this sort of thing could probably go away (except on Windows, but the linker situation there is probably one of the most problematic parts of the D toolchain).</div>