foreach with classes like associative array?

Matt Soucy msoucy at
Fri Jan 20 16:53:33 PST 2012

So I was messing around with some code I've been writing today, and I 
wanted to use a foreach for something, as if it were an associative 
array. The problem is, I can't find any information on how to do that.
I can't use something like "alias this", because the class I'm writing 
acts as a wrapper that lets me use string offsets for something that's 
not string-indexed by default.
I don't see any sort of opApply or similar to do this, and the foreach 
section of doesn't help. Is there a way to do it?
Thank you,
-Matt Soucy

More information about the Digitalmars-d-learn mailing list