foreach seems to work with opIndex()

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 6 07:00:22 PST 2016


On 06.02.2016 15:43, Tofu Ninja wrote:
> Foreach seems to work if there is an opIndex() with no arguments that
> returns a range interface, is this documented? I can't seem to find
> anything that say this is supposed to happen. I am not really
> complaining, its nice, but I just didnt really expect it because I feel
> like I remember this being an error some time ago.

https://issues.dlang.org/show_bug.cgi?id=14619


More information about the Digitalmars-d-learn mailing list