Article View: comp.std.c++
Article #1216Re: Zero-length structures and pointer comparisons
From: John MAX Skaller
Date: Sat, 12 Dec 1992 15:49
Date: Sat, 12 Dec 1992 15:49
22 lines
1448 bytes
1448 bytes
In article <1992Dec9.075125.22405@lth.se> dag@bellman.control.lth.se (Dag Bruck) writes:
> p != q <=> p < q | p > q
>
>for all pointers. I'm not asking for a particular ordering, just an
>implementation defined behaviour that meets the equivalence above.
>
Since existing 8086 implementations do not satisfy the above
condition, yet are conforming programs, would you accept Fergus
Henderson's suggestion:
p != q <=> ptrcmp(p,q)<0 || ptrcmp(p,q)>0
which cannot break existing implementations but provides a total
order by way of a library function? If so, can we put this to
the library WG?
--
;----------------------------------------------------------------------
JOHN (MAX) SKALLER, maxtal@extro.ucc.su.oz.au
Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Technical Details
Message-ID:
<1992Dec12.154918.2220@ucc.su.OZ.AU>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtalReferences:
<1992Dec8.103218.27689@lth.se> <1992Dec8.173855.18153@meaddata.com> <1992Dec9.075125.22405@lth.se>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) Subject: Re: Zero-length structures and pointer comparisons Message-ID: <1992Dec12.154918.2220@ucc.su.OZ.AU> Sender: news@ucc.su.OZ.AU Nntp-Posting-Host: extro.ucc.su.oz.au Organization: MAXTAL P/L C/- University Computing Centre, Sydney References: <1992Dec8.103218.27689@lth.se> <1992Dec8.173855.18153@meaddata.com> <1992Dec9.075125.22405@lth.se> Date: Sat, 12 Dec 1992 15:49:18 GMT Lines: 22