A enum value that corresponds to the index. Note: The function doesn't check that index is less then EnumMembers!T.length.
enum Linear { one = 1, two = 2 } static assert(is(typeof(unsafeEnumFromIndex!Linear(0)) == Linear)); assert(unsafeEnumFromIndex!Linear(0) == Linear.one); assert(unsafeEnumFromIndex!Linear(1) == Linear.two); enum Mixed { one = 1, oneAgain = 1, two = 2 } assert(unsafeEnumFromIndex!Mixed(0) == Mixed.one); assert(unsafeEnumFromIndex!Mixed(1) == Mixed.one); assert(unsafeEnumFromIndex!Mixed(2) == Mixed.two);