D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3902 - Definition of opCmp
Summary: Definition of opCmp
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-08 14:42 UTC by Norbert Nemec
Modified: 2014-02-15 02:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Norbert Nemec 2010-03-08 14:42:44 UTC
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

DMD seems to work correctly, though.
Comment 1 Don 2010-04-09 19:24:21 UTC
Fixed DMD2.042.