www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Odd contortions with template specializations


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) {}

But that fails, saying that the instance doesn't match any template 
declaration. The following worked:

template bar (T : int[U], U) {}

Any suggestions? Do D template specializations just not support this?
Nov 11 2007