EnumBase.opIndex

Looks up an enum member's value from its name, using opIndex.

  1. Name opIndex(Value v)
  2. Value opIndex(Name n)
    template EnumBase(T...)
    override
    opIndex

Parameters

n Name

name to look up

Return Value

Type: Value

corresponding value

Throws

(in non-release builds) ArrayBoundsException if value doesn't exist in enum

Meta