[Issue 24540] Add order/index to enum member to return its position

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 6 13:28:12 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24540

--- Comment #1 from apham <apz28 at hotmail.com> ---
The value is also needed to be known at compile time

static assert(Foo.one.order == 0);
static assert(Foo.two.order == 1);

--


More information about the Digitalmars-d-bugs mailing list