October 30, 2019 Array Vararg Template Paremeters | ||||
---|---|---|---|---|
| ||||
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. |
Copyright © 1999-2021 by the D Language Foundation