Re: Templating Function Names

2016-12-08 Thread Ali Çehreli via Digitalmars-d-learn
On 12/08/2016 10:21 AM, Bryce Kellogg wrote: > It should look like Foo always had a property named after their custom Component. opDispatch? https://dlang.org/spec/operatoroverloading.html#dispatch Ali

Templating Function Names

2016-12-08 Thread Bryce Kellogg via Digitalmars-d-learn
Say I've got a bunch of classes that inherit from a common interface (in this case Component) and a class Foo that can handle any subclass of Component. Like so: interface Component { ... } class A : Component { ... } class B : Component { ... } class C : Component { ... } class Foo {