You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
iamthewilsonator (@thewilsonator) reported this on 2018-10-05T06:55:35Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=19287
CC List
Description
The text was updated successfully, but these errors were encountered: