On 07/08/17 12:37, Timon Gehr wrote:
struct S(T...) { T param;void initialize(T param) { this.param = param; // Other stuff } } Then, use S!() instead of S!void.
It's an interesting approach. It has the down side that it also accepts S!(int, string, int[23], double), and I'm still not sure what I think about this option (i.e. - whether I want to allow it).
If not, then things start to look quite misleading to the user, and I'd rather have the ugly static-ifs than do that.
Shachar
