[Issue 2239] New: Template instantiation failure when template parameter type passed as template parameter.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 21 15:41:05 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2239
Summary: Template instantiation failure when template parameter
type passed as template parameter.
Product: D
Version: 2.018
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: simen.kjaras at gmail.com
struct foo(T, T a) {}
void bar(T, T a)(foo!(T, a) f) {}
void main()
{
foo!(float, 0) f;
bar!(float, 0)(f); // cannot implicitly convert expression (f) of type
foo!(float,0) to foo!(float,A)
}
If a's type is instead set in the template definition, this compiles correctly.
--
More information about the Digitalmars-d-bugs
mailing list