Odd contortions with template specializations

Christopher Wright dhasenan at gmail.com
Sun Nov 11 16:05:59 PST 2007


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?


More information about the Digitalmars-d-learn mailing list