EnumMembers

Returns all members of $(D_KEYWORD enum) T.

The members of T are typed as T, not as a base type of the enum.

EnumMembers returns all members of T, also if there are some duplicates.

Members

Aliases

EnumMembers
alias EnumMembers = AliasSeq!(__traits(getMember, T, allMembers))
Undocumented in source.
EnumMembers
alias EnumMembers = getEnumMembers!allMembers
Undocumented in source.

Parameters

T

A $(D_KEYWORD enum).

Return Value

All members of T.

Examples

enum E : int
{
    one,
    two,
    three,
}
static assert([EnumMembers!E] == [E.one, E.two, E.three]);

Meta