https://issues.dlang.org/show_bug.cgi?id=15202

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from [email protected] ---
You're calling `front` without checking `empty`. The range documentation [1]
says: "Calling r.front is allowed only if calling r.empty has, or would have,
returned false." There's no mention of range implementations having to throw an
exception in such a case, so `filter`'s behavior isn't wrong.

I'm closing this as invalid. If you'd like `filter` to throw an exception here,
please file a new issue with severity set to "enhancement".

[1] http://dlang.org/phobos/std_range_primitives.html

--

Reply via email to