digitalmars.D.learn - Odd contortions with template specializations
- Christopher Wright (12/12) Nov 11 2007 Hey,
Hey, I'm trying to do some template specialization stuff. What I'm trying to get is something equivalent to: template foo (T : Base!(U), U) {} interface Base(T) {} interface Derived : Base!(Object) {} foo!(Derived); But that fails, saying that the instance doesn't match any template declaration. The following worked: template bar (T : int[U], U) {} bar!(int[Object]); Any suggestions? Do D template specializations just not support this?
Nov 11 2007