"this" as default parameter for a constructor.
Kagamin
spam at here.lot
Mon Apr 12 13:14:27 UTC 2021
class foo {
this ( foo p /* , other params */ ) {
parent = p;
}
foo create() {
return new foo(this);
}
void use() {
foo f = create();
}
foo parent;
}
More information about the Digitalmars-d-learn
mailing list