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.
Anthony Quizon via Digitalmars-d-learn Fri, 22 Jul 2022 06:26:38 -0700
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.