https://issues.dlang.org/show_bug.cgi?id=14619
Dennis <dkor...@live.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dkor...@live.nl --- Comment #4 from Dennis <dkor...@live.nl> --- I was surprised today that opSlice() / opIndex() even worked at all to make a struct foreach-able. I looked at the spec, and couldn't find anything: https://dlang.org/spec/statement.html#foreach-statement https://dlang.org/spec/operatoroverloading.html#slice So aside from the behavior, the documentation should also be updated. Btw, the responsible code is currently here: https://github.com/dlang/dmd/blob/4522e0236f2abde017c3ec1192f76c6cf661b7c2/src/dmd/opover.d#L1521 --