Article View: comp.std.c++
Article #21Re: return type of operator=
From: Bjarne Stroustrup
Date: Sat, 31 Oct 1992 13:48
Date: Sat, 31 Oct 1992 13:48
22 lines
968 bytes
968 bytes
sdm@cs.brown.edu (Scott Meyers @ Brown University Department of Computer Science) writes > Is the return type of operator= an lvalue? yes > In particular, if a, b, and c are of built-in type, is this legal? > > (a = b) = c; yes > I couldn't find an answer in the ARM, and cfront accepts this, while g++ > rejects it. The third sentence of the first paragraph of 5.17 of the reference manual (pg 79 of the ARM, pg 506 Of my 2nd edition): The result of the assignment operator is ...; the result is and lvalue.
Technical Details
Message-ID:
<24063@alice.att.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!bsReferences:
<1992Oct31.025229.6520@cs.brown.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!bs From: bs@alice.att.com (Bjarne Stroustrup) Newsgroups: comp.std.c++ Subject: Re: return type of operator= Message-ID: <24063@alice.att.com> Date: 31 Oct 92 13:48:12 GMT Article-I.D.: alice.24063 References: <1992Oct31.025229.6520@cs.brown.edu> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 22