digitalmars.D.bugs - [Issue 1514] New: mixin doesn't make the template to "function template"
- d-bugmail puremagic.com (34/34) Sep 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1514
- d-bugmail puremagic.com (24/24) Sep 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1514
http://d.puremagic.com/issues/show_bug.cgi?id=1514 Summary: mixin doesn't make the template to "function template" Product: D Version: 1.014 Platform: PC OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: davidl 126.com import std.stdio; template prerequisite(T) { static assert(T.max==int.max); alias T type; } template mytemp(T) { mixin subtemp!(T); template subtemp(U:prerequisite!(T).type) { void mytemp(T v) { writefln(v); } } } void main() { mytemp(3); } --
Sep 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1514 simplified case abc.d: import std.stdio; template mytemp(T) { mixin subtemp!(T); template subtemp(U) { void mytemp(T v) { writefln(v); } } } void main() { mytemp(3); } abc.d(3): template abc.mytemp(T) is not a function template abc.d(17): template abc.mytemp(T) cannot deduce template function from argument types (int) --
Sep 17 2007