forward

Forwards its argument list preserving $(D_KEYWORD ref) and $(D_KEYWORD out) storage classes.

$(D_PSYMBOL forward) accepts a list of variables or literals. It returns an argument list of the same length that can be for example passed to a function accepting the arguments of this type.

Members

Aliases

forward
alias forward = AliasSeq!()
Undocumented in source.
forward
alias forward = args[0]
Undocumented in source.
forward
alias forward = AliasSeq!(args[0], forward!(args[1..$]))
Undocumented in source.
forward
alias forward = forwardOne
Undocumented in source.
forward
alias forward = AliasSeq!(forwardOne, forward!(args[1..$]))
Undocumented in source.

Properties

forwardOne
auto forwardOne [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Parameters

args

Argument list.

Return Value

args with their original storage classes.

Examples

static assert(is(typeof((int i) { int v = forward!i; })));
static assert(is(typeof((ref int i) { int v = forward!i; })));
static assert(is(typeof({
    void f(int i, ref int j, out int k)
    {
        f(forward!(i, j, k));
    }
})));

Meta