On Monday, 14 December 2020 at 14:39:14 UTC, ddcovery wrote:
On Monday, 14 December 2020 at 12:22:26 UTC, ddcovery wrote:
    int opCmp(Number other){
      return _value - other.value;
    };
Correction:

bool opEquals(Number other){
  return _value == other.value;
};

You could just give the struct a variable and use that instead of the enclosing function's parameter:

https://run.dlang.io/is/4Lqf15

Then, the struct can actually be static.

Reply via email to