On Tuesday, 11 June 2019 at 02:04:13 UTC, Machine Code wrote:
I also, quite disappointed how UDAs doesn't work with enums. I end up using struct + enum to simulate that, sometimes it's quite a work.
They do now...
struct foo {}
enum Foo {
@foo a
}
void main() {
foreach(item; __traits(allMembers, Foo))
pragma(msg, __traits(getAttributes,
__traits(getMember, Foo,
item)));
}
