Protected constructor, prevents external instantiation. (Use the singleton instance returned by opCall().)
foreach iteration over the names and values in the enum.
foreach iteration over the names and values in the enum and their indices.
Looks up an enum member's name from its value.
Looks up an enum member's value from its name.
Looks up an enum member's name from its value, using opIndex.
Looks up an enum member's value from its name, using opIndex.
Internal maps from names <-> values. The maps are filled in the static constructor.
tuple: T[0] must be an associative array of type int[char[]] (Note that the template accepts a tuple purely as a workaround for the compiler's inability to handle templates which accept associative array values.)
TODO: adapt to accept *either* an AA or a simple list of names (for an auto-enum with values starting at 0).
Template mixin to add enum functionality to a class.
Note that the [0..$] which is used in places in this method is a workaround for various weird compiler issues / segfaults.