https://issues.dlang.org/show_bug.cgi?id=22008
Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> --- @TungstenHeart created dlang/dmd pull request #12650 "fix 22008 - allow to iterate over enum members without `__traits`" fixing this issue: - fix 22008 - allow to iterate over enum members without `__traits` Adds the support to recognize EnumDeclaration as forerach aggregate. The following code ```d foreach (e; __traits(allMembers, E)) { auto v = __traits(getMember, E, e); } ``` can be more simply written ```d foreach (v; E) {} ``` This saves AST space, copies, time spent in semanticTraits with very few new dmd code. https://github.com/dlang/dmd/pull/12650 --