On Saturday, 23 August 2014 at 01:32:13 UTC, Meta wrote:
On Saturday, 23 August 2014 at 01:24:10 UTC, Meta wrote:What is happening here? Are these two extra ulongs the offsets of the fields in the struct?And I just realized that that's obviously not the case. It's just an iteration variable. Problem solved.
It is same with arrays: int[] arr = [ 1, 2, 3 ]; // ok, iterates elements foreach (elem; arr) { } // also ok, iterates elements + counts current index foreach (index, elem; arr) { }