home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!usc!news.service.uci.edu!ucivax!news.claremont.edu!nntp-server.caltech.edu!ccsf.caltech.edu!iotov
- From: iotov@ccsf.caltech.edu (Mihail Iotov)
- Newsgroups: comp.lang.c++
- Subject: operator overloading
- Date: 20 Nov 1992 04:55:12 GMT
- Organization: CCSF Caltech, Pasadena, CA
- Lines: 23
- Distribution: world
- Message-ID: <1ehr3gINNopf@gap.caltech.edu>
- NNTP-Posting-Host: pollux.ccsf.caltech.edu
-
-
-
- I am trying to overload some operators this way
-
- set& set::operator= (const set& s) ;
-
- set set::operator* (const set& s)
- {
- set product ;
- [do something]
- return product ; /* this line is 88 */
-
- }
- and I get form g++ :
-
- set.cxx: In method class set set::operator * (const class set &):
- set.cxx:88: warning: bitwise copy: `set' defines operator=()
-
- Shouldn't the assignment method be called for the return operation ?
-
-
- Thanks,
- Mihail
-