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: [email protected]
Reporter: [email protected]
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) {}
}
}
--