On Wed, 20 May 2009 13:09:37 +0400, Kagamin <s...@here.lot> wrote: > BCS Wrote: > >> smaller object code? OTOH a good implementation will noice when I can >> fold >> together several template expansions > > That's the difference. You can't fold templates because they're binary > incompatible as opposite to generics.
You can fold /some/ templates. I believe LLVM already does merging of identical functions (including templates, virtual functions etc) as a part of optimization process. Not sure about LDC, though.