www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18638] New: The main override of std.range.zip could infer


          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.

Mar 20 2018