The proper name for the paradigm is "template metaprogramming".
According to Wikipedia, template programming metaprogramming is a subset of generic programming which uses templates to generate code at compile time. A generic language could use something other than templates for code generation, or it could do it at run time. Templates are specifically for compile time generation.