Frits van Bommel Wrote: > > That's the difference. You can't fold templates because they're binary > > incompatible as opposite to generics. > > They're not always binary-incompatible. For instance, if a template only > works > with pointers or references (this includes object references) to parameter > types > it might well contain the exact same machine code for some of the > instantiations.
If you require that the class inherits some interface and call that interface's methods, they'll be incompatible. I'll dare to say this is the most useful variant of generic code.