From -695772195676517207
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,221e73cda6c65dc7
X-Google-Attributes: gidf78e5,public
From: Barry Margolin <barmar@genuity.net>
Subject: Re: relational operators and pointers
Date: 2000/06/22
Message-ID: <Q6Q35.54$E45.1079@burlma1-snr2>#1/1
X-Deja-AN: 637331027
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <8iog9l$2bo$1@news.rrz.Uni-Koeln.DE>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 961614328 mail2news:13297 mail2news mail2news.demon.co.uk
Organization: Genuity, Cambridge, MA
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Copies-To: never
NNTP-Posting-Date: Tue, 20 Jun 2000 20:04:00 GMT
Newsgroups: comp.std.c++

In article <8iog9l$2bo$1@news.rrz.Uni-Koeln.DE>,
Boris <boris@gtemail.net> wrote:
>The C++ Standard says somewhere:
>"For templates greater, less, greater_equal, and less_equal,  the
>specializations for any pointer type yield a total order, even if the
>built-in operators <, >, <=, >= do not."
>Does this implicitly mean that == and != are ok for comparing pointers no
>matter what pointers are compared?

Yes.  If you couldn't compare pointers to different objects for equality,
you would be really screwed.

-- 
Barry Margolin, barmar@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

---
[ 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              ]




