Bug 2239 – Template instantiation failure when template parameter type passed as template parameter.

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-07-21T17:41:00Z
Last change time
2015-06-09T01:20:08Z
Keywords
rejects-valid
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2008-07-21T17:41:01Z
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.
Comment #1 by simen.kjaras — 2010-06-17T10:44:15Z
*** This issue has been marked as a duplicate of issue 2372 ***