Template Inheritance

Timon Gehr timon.gehr at gmx.ch
Sat Feb 25 06:43:10 PST 2012


On 02/22/2012 01:13 AM, BLM wrote:
> That last one looks a lot better than my solution. It's certainly a lot clearer.
>
> One problem I discovered with using templates was that I ended up needing virtual
> functions, which means that I had to convert the template functions to mixins and
> just instantiate them for each type (at least there were only two types to
> handle!) in the base class. The problem I've got now is that if I create versions
> of get() that take different types in subclasses, I lose access to the
> superclass's overload set. If I try to use "alias Base.get get", DMD complains
> that the alias and the functions conflict. It looks like I can override existing
> overloads but not create new ones. I guess I might have to put a hold on the
> project until the language gets modified (assuming that actually happens). How
> would I go about filing an enhancement request?

You can post it in the bug tracker and choose severity as 'enhancement':
http://d.puremagic.com/issues/


More information about the Digitalmars-d-learn mailing list