Template Inheritance
Timon Gehr
timon.gehr at gmx.ch
Sat Feb 18 18:59:15 PST 2012
On 02/19/2012 02:23 AM, %u wrote:
> I think I got it! This seems to work:
>
> class Derived {
> //Pulls in all the template forms in the base class
> template get(args ...) {
> alias Base.get!args get;
> }
>
> //Create new versions of get() here.
> }
This kills IFTI for the base class templates. It would be nice if it
would work. Do you want to file an enhancement request? Otherwise I'll
do it.
This one lets you keep IFTI, but does not forward perfectly for some
special implicit conversions.
auto get(T...)(T a){return super.get!T(a);}
More information about the Digitalmars-d-learn
mailing list