Hi,<br><br>I'm new to D. I have the following:<br><br> class A(T) { ... }<br> class B(T) : A!(T) { ... }<br><br> class C(T, U : A!(T)) { ... }<br><br>And I'm trying to do this<br><br> void main()<br> {<br>
C!(double, B!(double)) var;<br> }<br><br>but dmd complains:<br> Error: template instance C!(double,B) does not match template declaration C(T,U : A!(T))<br><br>If I change the line of main() by<br><br> void main()<br>
{<br> C!(double, A!(double)) var;<br> }<br><br>it works OK. Does the fact that B(T) is a child of A(T) imply that I can use B(T) as a template parameter wherever A(T) is expected?<br><br>Could you please point to where I'm doing things wrong. I'd really appreciate your feedback.<br>
<br>Thanks,<br>Ivo<br>