ParameterDefaults

Returns a tuple with default values of the parameters to F.

If a parameter doesn't have a default value, $(D_KEYWORD void) is returned.

template ParameterDefaults (
F...
) if (
isCallable!F
) {}

Members

Aliases

ParameterDefaults
alias ParameterDefaults = GetDefault!0
Undocumented in source.

Parameters

F

A function.

Return Value

Default values of the parameters to F.

Examples

void func1(int k, uint b = 5, int[] = [1, 2]);
alias Defaults = ParameterDefaults!func1;
static assert(is(Defaults[0] == void));
static assert(Defaults[1 .. 3] == AliasSeq!(5, [1, 2]));

Meta