Array!bool -> Chunks -> foreach: out of bounds

0xEAB desisma at heidel.beer
Wed Aug 15 13:50:29 UTC 2018


> core.exception.AssertError@/src/phobos/std/container/array.d(1667): Using out of bounds indexes on an Array

Should this code[1] really try to access something out of bounds 
and assert?


Also: shouldn't this assertion[2] be perhaps inside 
`version(D_NoBoundsChecks){} else { ... }` block?


Kind regards,
Elias


[1] https://run.dlang.io/is/l6eyCF
[2] 
https://github.com/dlang/phobos/blob/v2.081.2/std/container/array.d#L1667


More information about the Digitalmars-d-learn mailing list