March 20, 2018 [Issue 18638] New: The main override of std.range.zip could infer @nogc and nothrow | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=18638 Issue ID: 18638 Summary: The main override of std.range.zip could infer @nogc and nothrow Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: n8sh.secondary@hotmail.com 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. -- |
Copyright © 1999-2021 by the D Language Foundation