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

--- Comment #2 from Paul Backus <[email protected]> ---
There is another example use-case in issue 16034.

Currently, `isInputRange` always evaluates to `false`, for ranges with
non-copyable elements, because it checks for the presence of `.front` by
attempting to compile the following lambda:

    (R r) => r.front

If `r.front` returns by `ref`, this will cause its return value to be copied,
which in turn causes compilation to fail when its type is non-copyable.

With `auto ref` lambdas, this could be fixed by changing the lambda to

    auto ref (R r) => r.front

As-is, the fix will require a more invasive change.

--

Reply via email to