Function constructorBasedFactory

Instantiates aggregate using it's constructor with args.

auto auto constructorBasedFactory(T, Args...) (
  Locator!() locator,
  auto ref Args args
);

Encapsulates construction of aggregate using a constructor, with args. Arguments from argument list that are references, are automatically replaced with data extracted from locator.

Parameters

NameDescription
T aggregate type
Args type tuple of args that are passed to T's constructor