ParameterList

Represents a function's formal parameters + variadics info. Length, indexing and iteration are based on a depth-first tuple expansion. https://dlang.org/spec/function.html#ParameterList

Constructors

this
this(Parameters* parameters, VarArg varargs, StorageClass stc)
Undocumented in source.

Members

Functions

length
size_t length()

Returns the number of expanded parameters. Complexity: O(N).

opApply
int opApply(Parameter.ForeachDg dg)

Iterates over the expanded parameters. Complexity: O(N). Prefer this to avoid the O(N + N^2/2) complexity of calculating length and calling N times opIndex.

opApply
int opApply(Parameter.SemanticForeachDg dg)

Iterates over the expanded parameters, matching them with the unexpanded ones, for semantic processing

opIndex
Parameter opIndex(size_t i)

Returns the expanded parameter at the given index, or null if out of bounds. Complexity: O(i).

syntaxCopy
ParameterList syntaxCopy()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

parameters
Parameters* parameters;

The raw (unexpanded) formal parameters, possibly containing tuples.

stc
StorageClass stc;
Undocumented in source.
varargs
VarArg varargs;
Undocumented in source.

Meta