[Issue 11098] template instance x cannot use local y as parameter to non-global template z
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 23 12:34:29 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=11098
--- Comment #2 from ryan at rcorre.net ---
This is still around in DMD2.067.
The UFCS trick is a nice work-around on the callee side.
You can also work around it on the caller side with:
struct S {
void f(alias F)() { }
}
void main() {
static int fun(int i) { return i; }
S.init.f!(fun);
}
Both are less than ideal though.
--
More information about the Digitalmars-d-bugs
mailing list