Summary: | opCmp documentation really needs some examples | ||
---|---|---|---|
Product: | D | Reporter: | Bill Baxter <wbaxter> |
Component: | dlang.org | Assignee: | Walter Bright <bugzilla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | D1 (retired) | ||
Hardware: | x86 | ||
OS: | Windows |
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
Fixed dmd 1.028 and 2.012