mixin template bug with opBinary?

Anthony Quizon anthoq88 at gmail.com
Fri Jul 22 13:23:00 UTC 2022


On Friday, 22 July 2022 at 12:56:44 UTC, Adam D Ruppe wrote:
> ```
> mixin template opBi(
>     alias f0
> ) {
>     static foreach (k, f; f0) { typeof(this) opBinary(string op:
>     k)(typeof(this) r) { return f(this, r); } }
> }
> ```

Thanks, this seems to do the trick.


More information about the Digitalmars-d-learn mailing list