September 18, 2007 [Issue 1514] New: mixin doesn't make the template to "function template" | ||||
---|---|---|---|---|
| ||||
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); } -- |
September 18, 2007 [Issue 1514] mixin doesn't make the template to "function template" | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1514 ------- Comment #1 from davidl@126.com 2007-09-18 01:00 ------- 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) -- |
Copyright © 1999-2021 by the D Language Foundation