Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: friend operator +(l,r) vs. operator +(r) Message-ID: <2756A73D.5EDF@tct.uucp> Date: 30 Nov 90 18:38:53 GMT References: <1990Nov22.230835.26713@clear.com> Organization: Teltronics/TCT, Sarasota, FL Lines: 15 According to fox@allegra.att.com (David Fox): >Perhaps it is a cop out, but my life has been much easier since >I gave up operator+ entirely and switched to operator+=. 1/2 :-) No smileys -- this is *excellent* advice. I tossed concatenation out of my String class, and never noticed the loss. Except now my code compiles faster and smaller. Hint: Define "operator +=" in terms of a basic "append" member function. Sometimes you'll want to append random bytes from the middle of a random buffer... -- Chip Salzenberg at Teltronics/TCT , "I'm really sorry I feel this need to insult some people..." -- John F. Haugh II (He thinks HE'S sorry?)