1853 – opCmp documentation really needs some examples

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1853 - opCmp documentation really needs some examples
Summary: opCmp documentation really needs some examples
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2008年02月20日 01:59 UTC by Bill Baxter
Modified: 2014年02月24日 15:59 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Bill Baxter 2008年02月20日 01:59:07 UTC
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 Walter Bright 2008年03月07日 00:32:38 UTC
Fixed dmd 1.028 and 2.012


AltStyle によって変換されたページ (->オリジナル) /