opCmp, [partial/total/pre]orders, custom floating point types etc.

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 12 11:00:11 PST 2016


On 01/12/2016 01:27 PM, John Colvin wrote:
> Preorder or partial order: not possible in D, opCmp insists on totality.

The way I look at it, a partial order would implement opCmp and opEqual 
such that a < b, b < a, and a == b are simultaneously false for 
unordered objects. Would that float your boat? -- Andrei


More information about the Digitalmars-d mailing list