opCmp: strange definition in specs

Norbert Nemec Norbert at Nemec-online.de
Mon Mar 8 03:15:16 PST 2010


I just read through the specs about operators and found a strangeness in 
the definition of opCmp:

http://www.digitalmars.com/d/2.0/operatoroverloading.html#compare

Mathematically the following are equivalent
	a < b       <=>       b > a

But the definition seems to swap
	a < b	 into	  b >= a

I have not tested the compiler about this yet...



More information about the Digitalmars-d mailing list