Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!brunix!sdm From: sdm@cs.brown.edu (Scott Meyers) Newsgroups: comp.lang.c++ Subject: Re: friend operator +(l,r) vs. operator +(r) Message-ID: <57808@brunix.UUCP> Date: 28 Nov 90 18:03:20 GMT References: <11759@hubcap.clemson.edu> <1990Nov21.053431.22340@actrix.co.nz> Sender: news@brunix.UUCP Reply-To: sdm@cs.brown.edu (Scott Meyers) Organization: Brown University Department of Computer Science Lines: 18 In article (Glenn Parker) writes: | In article , | fox@allegra.att.com (David Fox) writes: | > Another difference is that the member version can be virtual, while | > the friend version cannot. | | Is this really a big difference? Global overloading can make operator+ | work very much like a virtual function. If the friend function is declared This is really a big difference. Overloaded function calls are resolved based on static types, virtual function calls are resolved based on dynamic types. Scott ------------------------------------------------------------------------------- What's the difference between Willie Horton and Buddy Cianci? Willie Horton was convicted of his felony in Massachusetts.