Array Vararg Template Paremeters

Q. Schroll qs.il.paperinik at gmail.com
Wed Oct 30 20:18:11 UTC 2019


For a function, one can have a vararg parameter at the end like 
this:
int sum(int[] ar ...) { /* code */ }

But for templates, such a declaration is an error. Is there a 
specific reason why?
I know I can do it and ensure all the template parameters are 
values and are convertible to the desired type. However, it's 
easier to just use an array.


More information about the Digitalmars-d-learn mailing list