Article View: comp.std.c++
Article #1310Re: Pointer comparisons
From: Lars Nyman
Date: Fri, 18 Dec 1992 22:09
Date: Fri, 18 Dec 1992 22:09
16 lines
991 bytes
991 bytes
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.
Technical Details
Message-ID:
<18188@autodesk.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!decwrl!autodesk!larsnReferences:
<1992Dec17.224959.13288@microsoft.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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