On Thu, Mar 14, 2019 at 06:07:46PM +0000, Alec Stewart via Digitalmars-d-learn wrote: [...] > bool opEquals(ref const Interval i) const { > // probably would be a bit more than just this, but for this issue > // let's just stick with this. > return d_start.opEquals(other.d_start) && d_end.opEquals(other.d_end); > }
There's no need to call opEquals explicitly like that. All you need to do is to use <, ==, and > as you normally would: bool opEquals(ref const Interval i) const { return d_start == other.d_start) && d_end == d_end; } T -- Без труда не выловишь и рыбку из пруда.