digitalmars.D.bugs - [Issue 15719] New: Can't make template with name "this"
- via Digitalmars-d-bugs (26/26) Feb 24 2016 https://issues.dlang.org/show_bug.cgi?id=15719
https://issues.dlang.org/show_bug.cgi?id=15719 Issue ID: 15719 Summary: Can't make template with name "this" Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: lasssafin gmail.com You can't have a template inside an aggregate with the name "this". This prevents one from creating an advanced function template. This works: struct S { this(int i)(float f) {} } This doesn't: struct S { template this(int i) { this(float f) {} } } --
Feb 24 2016