struct T { int i; this(int a) {i=a;} } enum TENUM : T { foo = T(2), bar = T(3), } void main() { pragma(msg, TENUM.foo); // T(2) pragma(msg, TENUM.bar); // T(3) writeln(TENUM.foo); // foo writeln(TENUM.bar); // bar }
Could someone please explain why there is a difference in values
between compile-time and run-time?
- Value of type enum members Andrey Zherikov via Digitalmars-d-learn
- Re: Value of type enum member... Paul Backus via Digitalmars-d-learn
- Re: Value of type enum member... Petar via Digitalmars-d-learn