Variadic Struct Parameter

Jonathan Levi catanscout at gmail.com
Tue Jan 12 17:26:15 UTC 2021


Why is this not working?

```
struct S {
     int x;
     string y;
}

void fun(S s ...) {
     writeln(s);
}

void main() {
     fun(S(5,"hi"));
     fun(5,"hi");
}
```

Why does `fun` compile if calling it does not?


More information about the Digitalmars-d-learn mailing list