Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!pp!pink!rfg From: rfg@pink.ACA.MCC.COM (Ron Guilmette) Newsgroups: comp.lang.c++ Subject: Re: Arguments to Overloaded Operators Message-ID: <238@pink.ACA.MCC.COM> Date: 8 Jun 89 19:02:31 GMT References: <11032@orstcs.CS.ORST.EDU> <1100@cadillac.CAD.MCC.COM> Reply-To: rfg@pink.aca.mcc.com.UUCP (Ron Guilmette) Organization: MCC Austin, Texas Lines: 26 In article <1100@cadillac.CAD.MCC.COM> vaughan@mcc.com (Paul Vaughan) writes: >Two questions: >1) >Has anyone considered overloaded functions/operators that are selected >not only by a match of parameter types, but also according to the >return type needed in the context? That is, have multiple >definitions for the same function name with differing return types. >Forgive me if this has been beaten to death before. Forgive me also! I have been meaning to ask about this for quite awhile now. I have heard that Bjarne had *some* good reason for not allowing overloading based on return types, but I never actually found out what that reason was. Perhaps Andrew or Bjarne will clarify this for us. If they do, I hope that they will not be shy of details. I really want to fully understand the reason for this choice, right down to the nitty-gritty compiler-implementation details. -- // Ron Guilmette - MCC - Experimental Systems Kit Project // 3500 West Balcones Center Drive, Austin, TX 78759 - (512)338-3740 // ARPA: rfg@mcc.com // UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg