Template explosion

JS js.mdnq at gmail.com
Tue Jul 16 19:52:29 PDT 2013


It seems that one must use two templates to process built in 
times and strings

template A(string a) { ... }
template A(a) { enum A = A(typeof(a).stringof); }

This is so we can do stuff like A!(double) and A!("double").

The problem is when we have many parameters the number of 
permutations increases exponentially.

Is there a better way to unify the two?


More information about the Digitalmars-d-learn mailing list