D1 operator overloads have been deprecated.

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Mon Jul 15 08:07:37 UTC 2019


On Monday, 15 July 2019 at 08:00:26 UTC, Alexandru Ermicioi wrote:
> On Sunday, 14 July 2019 at 05:27:28 UTC, Bert wrote:
>> In the new way we have to have an alias redirector and the 
>> function rather than just the function. All we end up getting 
>> is freeing a member id name and a whole lot of broken code.
>
>
> It should be easy to fix by implementing an interface with D2 
> templated operators that forward to D1. The downside would be 
> that you'll need to add the interface to each class/interface 
> with existing D1 operators.

And an even better alternative would be to use mixin templates 
that introspect aggregate entity for d1 operators, and define d2 
forwarders. Then fixing woukd be just one one for each aggregate: 
mixin D1OperatorFix!().


More information about the Digitalmars-d mailing list