Using multiple mixin templates to implement operator overloading

Tobias Pankrath tobias+dlang at pankrath.net
Sat Dec 12 19:15:45 UTC 2020


On Saturday, 12 December 2020 at 18:14:31 UTC, Paul Backus wrote:
> Functions from different mixin templates can't overload each 
> other. The reason for this is that, when you mix in a mixin 
> template, it does not *actually* add the declarations inside it 
> to a current scope: instead, it adds them to a new scope, and 
> then (essentially) "imports" them into the current scope.
Much appreciated! Exactly the explanation I needed.




More information about the Digitalmars-d-learn mailing list