Bug 1853 – opCmp documentation really needs some examples

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-02-20T01:59:00Z
Last change time
2014-02-24T15:59:45Z
Assigned to
bugzilla
Creator
wbaxter

Comments

Comment #0 by wbaxter — 2008-02-20T01:59:07Z
The opCmp section really could use a struct example (and maybe a class example too). http://www.digitalmars.com/d/1.0/operatoroverloading.html It's not entirely obvious from the description given how you're supposed to write one, especially for a struct. I put an example on the comments page. Feel free to copy it: http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/OperatorOverloading#section4
Comment #1 by bugzilla — 2008-03-07T00:32:38Z
Fixed dmd 1.028 and 2.012