Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!HARVARD.HARVARD.EDU!ngo%tammy From: ngo%tammy@HARVARD.HARVARD.EDU (Tom Ngo) Newsgroups: gnu.g++.lib.bug Subject: Should "operator =" be made to return *this, by convention? Message-ID: <9002030548.AA00886@life.ai.mit.edu> Date: 3 Feb 90 04:42:54 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 11 C programmers are accustomed to expecting = to return the value assigned. However, in a few classes--for example, String, Integer and Rational-- operator == returns void. Is there a good reason for this? Could they be made to return String&, Integer& and Rational& *this without causing problems? Apologies if this has been brought up before... --Tom Ngo ngo@harvard.edu