"Jonathan M Davis" <[email protected]> wrote in message news:[email protected]... > Templates are completely different from generics. Generics are > compile-time > artifacts only and have no effect on the final binary. Templates, on the > other > hand, are generated for each type that they're instantiated with. They are > code generation, pure and simple. And since each and every instantiation > could > be very different depending on what was done with static if and other > compile- > time stuff which can affect code generation. So, if you had a > LinkedList<Account> and a LinkedList<string>, their internal > implementation > could be completely different if the writer of LinkedList thought that it > was > appropriate to do so for whatever reason.
Cant the compiler simply do a bitwise compare of all versions of a given template function/method, and remove any that have duplicate code? I mean actually compare the generated asm code.
