Fun with templates

Martin Nowak code at dawg.eu
Sun Jul 7 20:03:30 PDT 2013


On 07/07/2013 01:19 PM, Marco Leise wrote:
> If you wanted to save on template instantiations for every
> possible attribute combination, you are doing it wrong. Those
> are already 3 duplicate templates with binary identical
> functions foo(int a) in them, which makes me cry on the inside.

There is a linker optimization to get rid of the duplicates.
http://msdn.microsoft.com/en-us/library/bxwfs976(v=vs.110).aspx


More information about the Digitalmars-d mailing list