From -4631092678261732002
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,fbd36da46c3cc7a0
X-Google-Attributes: gidf78e5,public
From: Francis Glassborow <francis@robinton.demon.co.uk>
Subject: Re: Discussion: type_info
Date: 1999/12/08
Message-ID: <xq752tAkjZT4Ew1G@robinton.demon.co.uk>#1/1
X-Deja-AN: 557940484
Distribution: you
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <81ecdl$pq$1@nnrp1.deja.com> <memo.19991126195718.59965A@btinternet.com> <81u646$kln$1@nnrp1.deja.com> <823n5t$7qg@library1.airnews.net> <384BBE4F.ABDC393C@lucent.com> <7QYbIRArmTT4Ew2J@robinton.demon.co.uk> <82ju8c$jbf$1@oak.prod.itd.earthlink.net>
X-UID: 0000000001
X-Status: $$$T
Organization: Southfield Microcomputer SS
Mime-Version: 1.0
Reply-To: Francis Glassborow <francisG@robinton.demon.co.uk>
Newsgroups: comp.std.c++
Originator: clamage@taumet


In article <82ju8c$jbf$1@oak.prod.itd.earthlink.net>, AllanW <AllanW@my-
deja.com> writes
>AFAIK, any system that has a many-to-one relationship between pointers
>and addresses also has some concept that I'll call "normalization" which
>is already used when comparing two pointers for equality. This is by
>definition platform-dependant, so we can't give out algorithms, but we
>can give an example:
>
>    Change the bit pattern so that when it is interpreted as a pointer, the
>    address does not change, but when it is interpreted as an integer, the
>    value is lower. Continue until this change is no longer possible, and
>    then the bit pattern represents the normalized value.
>
>Naturally, for any real platform there will be equivalent algorithms that
>do not involve iteration.

There is no problem with comparing pointers for equality (even without
normalisation) however requiring that less than shall always 'work' is
requiring a complete ordering of addresses and that is something else.
>

Francis Glassborow      Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




