Compiling a template

Neia Neutuladh neia at ikeran.org
Fri Dec 7 04:31:23 UTC 2018


On Thu, 06 Dec 2018 22:50:49 +0000, albertas-jn wrote:
> If templates are a compile-time feature and instances of templates are
> generated by compiler at compile time, why is it possible to compile a
> template definition with dmd -lib or -c?

You compile files, not individual declarations like a template. If you 
have a source file containing a hundred templates and nothing else, and 
you compile it, you'll get the same output as if you had an empty source 
file, byte for byte.


More information about the Digitalmars-d-learn mailing list