Function construct

Construct component using args.

auto auto construct(Z, T, Args...) (
  Z factory,
  auto ref Args args
);

Constructs component using args, that are passed to function. The function will attempt to find at least one construct that can accept passed argument list. If it fails, compiler will produce error, with respective problems. The argument list can contain beside simple values, references to other components in locator. Arguments that are references to other components won't be type checked.

Parameters

NameDescription
factory the factory which will call constructor with passed arguments.
args a list of arguments that will be passed to constructor.

Returns

Z.