From 1010448737058919410 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,e94695845965b249 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 1992-10-19 11:22:30 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: <1992Oct19.184858.16873@microsoft.com> Date: 19 Oct 92 18:48:58 GMT Organization: Microsoft Corporation References: <1992Sep10.094957.23588@jyu.fi> <1992Oct16.234851.28948@microsoft.com> <23915@alice.att.com> Lines: 21 In article <23915@alice.att.com> ark@alice.UUCP () writes: |In article <1992Oct16.234851.28948@microsoft.com> jimad@microsoft.com (Jim Adcock) writes: | |> But in any case, at least my PC compiler (Large Model) |> performs == and != comparisons based both on the segment and offset parts. |> Its the ordered comparisons > < >= <= where only the offset part is compared. |> Thus == != work for all ptrs. > < >= <= only work within an array. | |> Which is as it should be. | |This is far from clear. | |For example, if a type T has a < operator defined that is actually a strong |total order relation, that makes it possible to store T objects efficiently |in a variety of order-based data structures such as M,N-trees, etc. |There are many applications for such structures. For example, one might make |the constructor and destructor for class T use such a structure to keep |track of all the T objects in the universe, and so on. Are you talking about overloadable comparison operators? I am talking about built-in ptr comparison operators as defined by C/C++