Thank you, -Matt Soucy
So I was messing around with some code I've been writing recently, and I
wanted to use a foreach on a struct 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, so there's nothing to alias it TO.
I don't see any sort of opApply or similar to do this, and the foreach
section of dlang.org doesn't help. Is there a way to do it, or do I need
to do a workaround?
- Indexed foreach on struct? Matt Soucy
- Re: Indexed foreach on struct? H. S. Teoh
- Re: Indexed foreach on struct? H. S. Teoh
- Re: Indexed foreach on struct? Ali Çehreli
- Re: Indexed foreach on struct? H. S. Teoh
- Re: Indexed foreach on struct? Ali Çehreli
- Re: Indexed foreach on struct? Matt Soucy
- Re: Indexed foreach on struct? Ali Çehreli