home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1859 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  967 b 

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!decwrl!autodesk!larsn
  2. From: larsn@Autodesk.COM (Lars Nyman)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Pointer comparisons
  5. Message-ID: <18188@autodesk.COM>
  6. Date: 18 Dec 92 22:09:23 GMT
  7. References: <1992Dec17.224959.13288@microsoft.com>
  8. Organization: Autodesk Inc., Sausalito CA, USA
  9. Lines: 18
  10.  
  11. ARM specifies what a comparison of two pointers to objects should return
  12. IF:
  13.     - the objects are the same
  14.     - the objects are non-static members of same object
  15.     - the objects are elements of the same array
  16.  
  17. Otherwise, the pointer comparison is implementation dependent.
  18.  
  19.  
  20. So, if I have pointers to two different objects the result of comparing
  21. them is implementation defined !?!
  22. Thus, I cannot even trust that a '!=' test will return 1 for two objects
  23. that are not the same !
  24.  
  25. This must surely be wrong... can somebody, please, correct me and explain
  26. what I'm overlooking.
  27.  
  28.  
  29.