February 14, 2004
But it still doesn't solve the problem of interface conformance. What if subclasses of Bar hide interfaces that the template needs ?

"Walter" <walter@digitalmars.com> wrote in message news:c0khog$1tu8$1@digitaldaemon.com...
>
> "Eric Decker" <Eric_member@pathlink.com> wrote in message news:c0h3hm$2h5h$1@digitaldaemon.com...
> > I was wondering if there is any intention of providing constrained
> templates.
>
> Already there:
>
>     template foo(T : Bar) { ... }
>
> means that T can only be a Bar or a type derived from Bar.
>
>


February 15, 2004
It probably won't compile the template instantiation successfully.

"Achilleas Margaritis" <axilmar@b-online.gr> wrote in message news:c0ksmv$2i4s$1@digitaldaemon.com...
> But it still doesn't solve the problem of interface conformance. What if subclasses of Bar hide interfaces that the template needs ?
>
> "Walter" <walter@digitalmars.com> wrote in message news:c0khog$1tu8$1@digitaldaemon.com...
> >
> > "Eric Decker" <Eric_member@pathlink.com> wrote in message news:c0h3hm$2h5h$1@digitaldaemon.com...
> > > I was wondering if there is any intention of providing constrained
> > templates.
> >
> > Already there:
> >
> >     template foo(T : Bar) { ... }
> >
> > means that T can only be a Bar or a type derived from Bar.
> >
> >
>
>


1 2
Next ›   Last »