Iterating through enumeration

Alexandr Druzhinin drug2004 at bk.ru
Sun Aug 12 03:36:21 PDT 2012


Hello all.
I have some enum foo { first=1, second=2, fourth=4, sixth=6} and I'd 
like to go through this enumeration like it:
foreach(m; foo.min..foo.max) {
	bar(m);
}
But without excluding foo.max and correct handle situation when enum 
identifiers aren't consequentive.

Thanks in advance


More information about the Digitalmars-d-learn mailing list