See https://forum.dlang.org/post/tgnnsqkclbcaejhbiprn@forum.dlang.org for the motivation. struct that contain destructors cannot be closed over (I'm not sure why but thats a different problem) and so CantCloseMe o; // some struct with a door somerange.each!(e => foo(o,e)); //Error: variable `o` has scoped destruction, cannot build closure fails. But it can't be worked around with somerange.each!((e,f) => foo(o,f))(o); Fails with Error: template somerange.each!((e,f) => foo(o,f)).each cannot deduce function from argument types !()(SomeRange, CantCloseMe), candidates are: ... because all of the each functions take only a range or iterable.
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10352 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB