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); --