enum.hpp is a code facility for defining enums in C++ that have associated lookup arrays from each value of the enum to the value of another type. The facility eliminates the possibility of hard-to-find bugs resulting from the lookup array order not corresponding to the enum value order.
Here is an older C example, along the same lines but less powerful.