[Issue 8850] Nested struct creation by a template
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 19 15:30:34 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8850
timon.gehr at gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timon.gehr at gmx.ch
--- Comment #3 from timon.gehr at gmx.ch 2012-10-19 15:30:32 PDT ---
I think it is supposed to work, the following does work:
T fun(T, alias f)(){
T s;
return s;
}
void main() {
int x=2;
void f(){}
struct R { int f() { return x; } }
auto m = fun!(R,f)();
}
(The reason why it works is that the alias function parameter forces local
template instantiation.)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list