Template interface and class

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu May 31 03:28:55 PDT 2007


Jason House wrote:
> gerleim wrote:
[snip]
>> public interface I(T)
>> {
>>     T Foo();
>> }
[snip]
> 
> On a side note... void bar (I!(int) i){ i.Foo() }
> will not work because templated functions are never virtual.

There are no templated functions in this case, just a method which 
happens to implement a signature specified by a templated interface. 
That does not make the function itself templated.


More information about the Digitalmars-d-learn mailing list