Enumerate

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.

alias Enumerate(Args...) = EnumerateFrom!(0, Args)

Parameters

Args

Enumerated sequence.

Examples

alias Expected = AliasSeq!(Pack!(cast(size_t) 0, int),
                           Pack!(cast(size_t) 1, uint));
static assert(is(Enumerate!(int, uint) == Expected));

See Also

$(D_PSYMBOL EnumerateFrom).

Meta