Template subclasses

Jarrett Billingsley jarrett.billingsley at gmail.com
Thu May 28 20:17:49 PDT 2009


On Thu, May 28, 2009 at 11:11 PM, Andrew <andrew.spott at gmail.com> wrote:
> I'm curious how someone implements a templated class.  Basically, how do I do this:
>
> Class Foo(T) {
>  T bar;
> }
>
> Class Fee:Foo {
>  T fum;
> }
>
> Any ideas?
>
> thanks
>
> -Andrew
>

You instantiate the base class.

class Fee(T) : Foo!(T)
{
    T fum;
}


More information about the Digitalmars-d-learn mailing list