Template specialization
Hasan Aljudy
hasan.aljudy at gmail.com
Tue Apr 18 23:38:56 PDT 2006
Li Jie wrote:
> I don't know what is the name of this usage:
>
> template <class T> class SomeClass{};
> template <class T, class U> class SomeClass< AnotherClass<T,U> >{};
>
> I think this is very commonly used, but D hasn't supported it yet, Is it in the
> plain?
>
> - Li Jie
>
>
Are you sure? I just tried, and the following works:
class SomeClass(T)
{
T x;
}
template AnotherClass(T,U)
{
class AnotherClass( SomeClass(T) )
{
}
}
void main()
{
}
More information about the Digitalmars-d
mailing list