DMD 0.163 release

Stewart Gordon smjg_1998 at yahoo.com
Wed Jul 19 04:19:58 PDT 2006


Is this silly mistake new, or has it gone unnoticed all this time?

http://www.digitalmars.com/d/operatoroverloading.html

"Note: Comparing a reference to a class object against null  should be 
done as:

     if (a is null)

and not as:

     if (a == null)

The latter is converted to:

     if (a.opCmp(null))

which will fail if opCmp() is a virtual function."

Two problems:
(a) you've got opCmp mixed up with opEquals
(b) it makes no sense that this is under the heading "Overloading <, <=, 
 > and >=".  Putting it under "Overloading == and !=" would be *better*....

Stewart.



More information about the Digitalmars-d-announce mailing list