Is it ok to inherit multiple times same templated interface?

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 16 10:03:06 PST 2017


On Sunday, 15 January 2017 at 23:25:25 UTC, Ryan wrote:
> How would overloading work?
>
> Overload resolution works based on function/method parameters, 
> not return types. In the example you gave the 3 get functions 
> are indistinguishable. If the template parameter was used for a 
> method parameter type, then they would be distinguishable.

Since the functions all have the same signature and interfaces 
can't store internal state, it doesn't matter which one is called.


More information about the Digitalmars-d-learn mailing list