On Thursday, 11 February 2016 at 12:55:02 UTC, rcorre wrote:
Though it appears (in 2.070 at least) that zip's range primitives aren't nogc:

I took a look at the source code for `zip()`, and the cause of this deficiency is that `Zip` takes a `StoppingPolicy` as a runtime parameter, rather than a compile-time parameter as it should.

`empty()` and `popFront()` can both throw - but only if `StoppingPolicy.requireSameLength` is selected. The default is `StoppingPolicy.shortest`.

This design dates back to 2009, which is probably before `nothrow` was implemented, and certainly before `@nogc`.

Reply via email to