🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1785

Re: STL operators != > <= >=

#1785
From: Joe Buck
Date: Tue, 15 Aug 1995 03:04
21 lines
1504 bytes
fenster@cs.columbia.edu (Sam Fenster) writes:
>And he's saying that because the STL headers give a template operator > that
>(for any type) returns true when <= is false, it screws up comparisons for any
>data type that is partially, but not totally (linearly) ordered!

No, because the STL template definition of > is merely a default, which
can be overridden with a specialized template for the class in question.

The real bug is that you can't change the return type in a specialization;
what STL is requiring is that relational operators always return bool.



--
-- Joe Buck 	<jbuck@synopsys.com>	(not speaking for Synopsys, Inc)
Anagrams for "information superhighway":	Enormous hairy pig with fan
A rough whimper of insanity
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <40o3fa$1jb@hermes.synopsys.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <3vpmv5$4t7@mujibur.inmind.com> <3vutg6$713@mujibur.inmind.com> <408o8u$c0p@hermes.synopsys.com> <FENSTER.95Aug10184743@shadow.cs.columbia.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 15 Aug 95 03:04:05 GMT
Approved: fjh@cs.mu.oz.au
Return-Path: <daemon@ncar.UCAR.EDU>
From: jbuck@Synopsys.COM (Joe Buck)
Newsgroups: comp.std.c++
Subject: Re: STL operators != > <= >=
X-Original-Date: 14 Aug 1995 18:08:42 GMT
Organization: Synopsys Inc., Mountain View, CA 94043-4033
Message-ID: <40o3fa$1jb@hermes.synopsys.com>
References: <3vpmv5$4t7@mujibur.inmind.com> <3vutg6$713@mujibur.inmind.com> <408o8u$c0p@hermes.synopsys.com> <FENSTER.95Aug10184743@shadow.cs.columbia.edu>