🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: STL operators != > <= >=

#1659
From: Etay Bogner
Date: Tue, 08 Aug 1995 13:02
29 lines
1514 bytes
Wouldn't the use of name spaces solve your problem ?

I hope this will work :

#include <function.h> // the STL Headers in which the problematic templates are defined

namespace X {
		template <class T>
		inline bool operator<=(const T& x, const T& y) {
  	  // your special implementation
		}
	// here will also go all the USERs ( i.e. classes ) of your partial order lists
	}

using namespace X;

// the USERs of your lists

The only overhead here is that all the users must be in the same namespace as your 
templates, or better yet, in their own namespace, with a using namespace in it, to use 
namespace X.

Another overhead is to wait for a compiler which implements namespaces :-).

-- Etay Bogner,
-- ebogner@ird.scitex.com ( OLD ),
-- Etay_Bogner@mail.stil.scitex.com,
-- Scitex Corp.
-- Israel.
Technical Details
Message-ID: <407n9d$nb7@lyman.pppl.gov>
Path: arc1-ca.pugleaf.net!nntpserver.pppl.gov!usenet
References: <3vpmv5$4t7@mujibur.inmind.com> <3vpnrq$50c@mujibur.inmind.com> <MATT.95Aug7100148@godzilla.EECS.Berkeley.EDU> <4065oq$3f4@mujibur.inmind.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nntpserver.pppl.gov!usenet
From: Etay Bogner <Etay_Bogner@mail.stil.scitex.com>
Newsgroups: comp.std.c++
Subject: Re: STL operators != > <= >=
Date: 8 Aug 1995 13:02:37 GMT
Organization: Scitex Corp.
Message-ID: <407n9d$nb7@lyman.pppl.gov>
References: <3vpmv5$4t7@mujibur.inmind.com> <3vpnrq$50c@mujibur.inmind.com> <MATT.95Aug7100148@godzilla.EECS.Berkeley.EDU> <4065oq$3f4@mujibur.inmind.com>
NNTP-Posting-Host: metay_pc.scitex.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.1N (Macintosh; I; PPC)
To: mfinney@inmind.com
X-URL: news://nntpserver.pppl.gov/4065oq$3f4@mujibur.inmind.com