From 1182159000866570826
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7522e5259f7267d6
X-Google-Attributes: gidf78e5,public
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: x = y = z;  Undefined?
Date: 2000/01/06
Message-ID: <t7so0bqea7.fsf@calumny.jyacc.com>#1/1
X-Deja-AN: 569210527
X-NNTP-Posting-Host: firewall.jyacc.com
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <MPG.12ddaa92533ae9679896a6@news.supernews.com>
X-UID: 0000000001
X-Status: $$$T
X-Complaints-To: abuse@panix.com
X-Trace: news.panix.com 947181099 23210 209.49.126.226 (6 Jan 2000 17:51:39 GMT)
Organization: PANIX Public Access Internet and UNIX, NYC
NNTP-Posting-Date: 6 Jan 2000 17:51:39 GMT
Newsgroups: comp.std.c++
Originator: clamage@taumet


smeyers@aristeia.com (Scott Meyers) writes:
>   int i1, i2, i3;
>   (i1 = i2) = i3;
> 
>   1.  Does the above example run afoul of the rule against modifing an
>       object more than once without an intervening sequence point?

Yes.

>   2.  Why does assignment for built-in types return an lvalue?

void f(int &n);
void g() { int n; f(n = 3); }


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




