How to require operator overloading in interface

JS js.mdnq at gmail.com
Sun Jul 21 00:14:36 PDT 2013


On Saturday, 20 July 2013 at 19:04:29 UTC, Jesse Phillips wrote:
> On Saturday, 20 July 2013 at 18:53:44 UTC, JS wrote:
>> if they want to allow the same op in there class, which they 
>> probably do, they have to override the long hand anyways and 
>> redirect.
>
> Nope, that is why you make the template final and forwards, all 
> derived classes will be able to instantiate the template and 
> behavior will be overridden by the forwarded function.

Sorry, I had a misconception about final(I didn't realize you 
could call a final method of a base class in a derived class).

I see it will work as described.

Thanks


More information about the Digitalmars-d-learn mailing list