The OpenD Programming Language

asOriginalType

Returns the representation of an enumerated value, i.e. the value converted to the base type of the enumeration.

asOriginalType
(
E
)
()
if (
is(E == enum)
)

Examples

enum A { a = 42 }
static assert(is(typeof(A.a.asOriginalType) == int));
assert(A.a.asOriginalType == 42);
enum B : double { a = 43 }
static assert(is(typeof(B.a.asOriginalType) == double));
assert(B.a.asOriginalType == 43);

Meta