From -1343306594366934482 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,e94695845965b249 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 1992-12-14 17:12:38 PST Newsgroups: comp.std.c++ Path: sparky!uunet!microsoft!hexnut!jimad From: jimad@microsoft.com (Jim Adcock) Subject: Re: Zero-length structures and pointer comparisons Message-ID: <1992Dec14.230730.24452@microsoft.com> Date: 14 Dec 92 23:07:30 GMT Organization: Microsoft Corporation References: <1992Dec11.212831.19493@bcrka451.bnr.ca> <5366@miramon.lulea.trab.se> Lines: 18 In article <5366@miramon.lulea.trab.se> jbn@lulea.trab.se (Johan Bengtsson) writes: |Other OODBMSs that use straight pointers to refer to persistent |objects (e.g. ObjectStore,Texas) must provide a rather special |ptrcmp(void*,void*), or disallow use of ptrcmp() for persistent |objects (may be difficult to check). What if ptrcmp [addrcmp] were allowed to return 0 for those objects and/or systems that don't define an ordering for those objects? The implication would be that one routine could be written that uses a fast ordering scheme on those OS's and/or objects that support the ordering, but a slower secondary scheme would have to be included for those cases of objects or OS's where the order is undefined. The secondary scheme would only have to be implemented by those programmers *really* interested in writing *really* portable code, since a defined ordering out of ptrcmp would be a common extension. ???