EnumerateFrom

Attaches a numeric index to each element from Args.

$(D_PSYMBOL EnumerateFrom) returns a sequence of tuples ($(D_PSYMBOL Pack)s) consisting of the index of each element and the element itself.

Members

Aliases

EnumerateFrom
alias EnumerateFrom = AliasSeq!()
Undocumented in source.
EnumerateFrom
alias EnumerateFrom = AliasSeq!(Pack!(start, Args[0]), EnumerateFrom!(start + 1, Args[1..$]))
Undocumented in source.

Parameters

start

Enumeration initial value.

Args

Enumerated sequence.

Examples

static assert(EnumerateFrom!(0, int, uint, bool).length == 3);
alias Expected = AliasSeq!(Pack!(cast(size_t) 0, int),
                           Pack!(cast(size_t) 1, uint));
static assert(is(EnumerateFrom!(0, int, uint) == Expected));

See Also

$(D_PSYMBOL Enumerate).

Meta