createLater

Binds type T with constructor arguments args.

createLater
(
T
Args...
)
(
Args args
)

Examples

static struct Foo { @disable this(this); int x; string t; }
static struct Bar { Foo foo; }
auto dc = createLater!Foo(42, "blah");
auto nc = dc;
auto bar = Bar(nc.create());
assert(bar.foo.x == 42);
assert(bar.foo.t == "blah");

Meta