On Saturday, 20 July 2013 at 17:39:59 UTC, bearophile wrote:
JS:variadic parameters are suppose to make life easier but it seems those don't work with templates.template A(int L) { ... } void foo(T)(string s, T t...) { A!(t.length); }Try this: template A(size_t L) { enum A = L; } void foo(T...)(string s, T t) { auto n = A!(t.length); } void main() { foo("x", 1, 2); } Bye, bearophile
;/ I could have swore I tried that ;/ Thanks though! ;)
