When do you use templates instead of CTFE?
Timon Gehr
timon.gehr at gmx.ch
Sat Mar 24 04:40:15 PDT 2012
On 03/24/2012 07:42 AM, Dan wrote:
> Since there is CTFE, I keep running into, do I really need this as a
> template parameter? Why not put this in a constructor. And so on...
>
>
You use templates in combination with CTFE if
- You have to perform computations on types.
- You want template instantiation syntax.
(If this is the only reason, the template will just wrap a CTFE
computation)
More information about the Digitalmars-d
mailing list