home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!decwrl!autodesk!larsn
- From: larsn@Autodesk.COM (Lars Nyman)
- Newsgroups: comp.std.c++
- Subject: Re: Pointer comparisons
- Message-ID: <18188@autodesk.COM>
- Date: 18 Dec 92 22:09:23 GMT
- References: <1992Dec17.224959.13288@microsoft.com>
- Organization: Autodesk Inc., Sausalito CA, USA
- Lines: 18
-
- ARM specifies what a comparison of two pointers to objects should return
- IF:
- - the objects are the same
- - the objects are non-static members of same object
- - the objects are elements of the same array
-
- Otherwise, the pointer comparison is implementation dependent.
-
-
- So, if I have pointers to two different objects the result of comparing
- them is implementation defined !?!
- Thus, I cannot even trust that a '!=' test will return 1 for two objects
- that are not the same !
-
- This must surely be wrong... can somebody, please, correct me and explain
- what I'm overlooking.
-
-
-