www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1853] New: opCmp documentation really needs some examples

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1853

           Summary: opCmp documentation really needs some examples
           Product: D
           Version: 1.027
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com


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


-- 
Feb 19 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1853


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla digitalmars.com  2008-03-07 00:32 -------
Fixed dmd 1.028 and 2.012


-- 
Mar 06 2008