On 01/12/2016 07:27 PM, John Colvin wrote:
...
struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b; assert(!(a==b)); assert(!(a<b)); assert(!(a<=b)); assert(!(a>b)); assert(!(a>=b)); }
Timon Gehr via Digitalmars-d Tue, 12 Jan 2016 12:56:07 -0800
On 01/12/2016 07:27 PM, John Colvin wrote:
...
struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b; assert(!(a==b)); assert(!(a<b)); assert(!(a<=b)); assert(!(a>b)); assert(!(a>=b)); }