How are (Static) Libraries with Templates Compiled?

jmh530 john.michael.hall at gmail.com
Mon Mar 11 19:53:53 UTC 2019


Suppose I have a file with a simple templated function. I compile 
that to a static library. I then compile another file that uses 
the library into an executable. When compiled to the static 
library, you don't know in advance what types it will call on the 
templated function, so that must be resolved when compiling the 
executable. So what information is in the static library that 
allows this to take place? Is the library just a simple 
collection of object files?


More information about the Digitalmars-d-learn mailing list