July 21, 2013 Re: How to require operator overloading in interface | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | 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
|
Copyright © 1999-2021 by the D Language Foundation