&gt; Either way, it provides what most people are asking for in generics (not you, perhaps), even if the implementation isn&#x27;t exactly pleasant.<p>No, it doesn&#x27;t. Not even close.<p>Even something like generic List&lt;T&gt; and sort&lt;T&gt;(List&lt;T&gt;) (separately compiled) will fall down because that simplistic scheme doesn&#x27;t give each generic type and function a different name, and there&#x27;s no way for sort&lt;T&gt; to look up whatever name List&lt;T&gt; got instantiated into.<p>There are also all sorts of hairy issues you will get into when you have name resolution and separate compilation: how do you make sure the macro got instantiated into the same lexical environment that it got declared in? This matters a lot when you have package A exporting a bunch of generic types and functions for package B to use, and it&#x27;s going to be B doing the expansion using B&#x27;s types. Even if you set up things just right to resolve the names in the proper lexical scope, how can B&#x27;s expansion of A&#x27;s templates use private symbols from A?<p>Finally, you have the dreaded C++ template error message problems, except they&#x27;re going to be even worse with this scheme because the compiler is going to complain about code post-textual-replacement, with no way to interpret the chain of events that led to the error. At least clang and GCC have lots of semantic information that they can use, since templates are expanded during semantic analysis.