False.The best use for template metaprogramming is when you have some value in your program, you know will be static, and you know can be completed in some time (not an infinite loop).
False.So the main use is in a situation where, perhaps you need to know constant value but all you have is the formula and the data to get the value.
Paraphrasing my own earlier comments: meta-programming is about generation.
That isn't the best use; that is the only use.
You can use meta-programming to:
generate a value by applying some algorithms to other values.
generate multiple values by applying some algorithms to other values.
generate an operation by sequencing other operations.
generate an operation by nesting other operations.
generate multiple operations by expanding a meta-program with several target operations.
generate an algorithm by sequencing operations or other algorithms.
generate an algorithm by nesting operations or other algorithms.
generate multiple algorithms by expanding a meta-program with several target algorithms.
generate the meta-programs that generate all of these things.
...
generate the meta-programs that generate the meta-programs that generate the meta-programs that...
You get the point?
You aren't wrong to say that it can generate a value. You can generate the value. You can also generate the formula that generates the value. You can generate the type that stores the value. You can generate the types that the formula operates on during expansion. You can choose between formulas. You can decide if any formula should be expanded.
Soma