Calling function explicitly from mixin template results in recursive call instead
    Dennis 
    dkorpel at gmail.com
       
    Mon Dec 10 23:45:15 UTC 2018
    
    
  
On Monday, 10 December 2018 at 21:16:23 UTC, aliak wrote:
> Does this fix your issue?
>
> struct S {
>     mixin operators ops;
>     S opBinary(string op, T)(T a) {
>         alias opBinary = ops.opBinary; // explicitly alias 
> opBinary in this scope
>         return opBinary!op(a);
>     }
> }
It does, thanks.
Though I now have problems of the mixin scope not being able to 
access overloads of the instantiation scope... I'll just stick 
everything in the template since this is just an uphill battle.
    
    
More information about the Digitalmars-d-learn
mailing list