[Issue 1292] New: Template argument deduction doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 25 06:24:24 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1292
Summary: Template argument deduction doesn't work
Product: D
Version: 1.016
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: onlystupidspamhere at yahoo.se
Code:
class B {}
class D : B {}
template foo(S, T : S) { } // doesn't work
// template foo(S, T : B) { } // this works for some reason
alias foo!(B, D) bar;
Compiler output:
bug.d(7): template instance foo!(B,D) does not match any template declaration
----
I'm guessing here what should happen:
More information about the Digitalmars-d-bugs
mailing list