enum and foreach

yvad yannurov at gmail.com
Mon Mar 31 23:10:22 PDT 2008


if there is any way to use named enum as source of foreach?
For example like

enum X {A, B, C}

foreach(x; X) ...

I have enum that can be extened in future. But I dont want to refactor sources every time I I extend enum


More information about the Digitalmars-d-learn mailing list