Bug 18638 – The main override of std.range.zip could infer @nogc and nothrow
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-20T14:09:40Z
Last change time
2018-03-30T01:38:53Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2018-03-20T14:09:40Z
The override of `std.range.zip` that doesn't take an explicit stopping policy defaults to `StoppingPolicy.shortest`. Instead of using the `std.range.Zip` struct that has a runtime-specifiable stopping policy we could use a nameless struct whose stopping policy is fixed at compile time. This would allow inferring @nogc and nothrow: having a runtime-settable StoppingPolicy is why `std.range.Zip` cannot infer those traits.
Comment #1 by n8sh.secondary — 2018-03-20T14:16:52Z