On Wednesday, 24 January 2018 at 07:21:09 UTC, Shachar Shemesh wrote:
test.d(6): Error: struct test.A(int var = 3) is used as a type

Of course it is. That's how structs are used.

Program causing this:
struct A(int var = 3) {
    int a;
}

void main() {
    A a;
}

To resolve, you need to change A into A!(). For some reason I have not been able to fathom, default template parameters on structs don't work like they do on functions.

Because IFTI is short for implicit function

Reply via email to