Another way to forward any constructor call is to do this:
import std.stdio; class A { int x; this(int x) { this.x = x; } } class B : A { this(Args...)(Args args) { super(args); } } void main() { auto b = new B(42); b.x.writeln; }
Another way to forward any constructor call is to do this:
import std.stdio; class A { int x; this(int x) { this.x = x; } } class B : A { this(Args...)(Args args) { super(args); } } void main() { auto b = new B(42); b.x.writeln; }