On Friday, 2 September 2022 at 18:39:27 UTC, rikki cattermole wrote:
I think you are wanting opAssign not opBinary.

Also you made a mistake, since its a struct you don't want to new it when you construct and return it.

```d
return new Time(secos / 3600, (secos % 3600) / 60, secos % 60);
```

Would be a ``Time*`` not ``Time`` which is what you returned.

And shouldn't an `opAssign` be `void` anyways? Doubt there's many people writing stuff like `auto c = (a = b);`, where `a` is a `struct`/`class`.

Reply via email to