home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!sparc0b!pjl
- From: pjl@cs.uiuc.edu (Paul Lucas)
- Subject: Re: operators
- Message-ID: <C197Co.JH4@cs.uiuc.edu>
- Keywords: operators,inheritance
- Sender: news@cs.uiuc.edu
- Organization: University of Illinois at Urbana-Champaign
- References: <1993Jan21.165621.16704@jussieu.fr>
- Date: Fri, 22 Jan 1993 11:45:59 GMT
- Lines: 17
-
- In <1993Jan21.165621.16704@jussieu.fr> clerc@gla.ecoledoc.ibp.fr writes:
-
-
- >Id like to express in C++ the fact that operators < <= >= can
- >be defined using operators > and = (eg: a < b is b > a)
- >I would use a class MathObj (that would implement < <= >= using > and =)
- >and derive my classes from it, redifining only the basic operators > and =
-
- I assume you meant: "in terms of operators > and =="
- ^
- >How can I WRITE that in C++ ? (no template solution please)
-
- Make < and == virtual in MathObj.
- --
- - Paul J. Lucas
- AT&T Bell Laboratories
- Naperville, IL
-