🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #761

Leapin' lvalues

#761
From: scott douglass
Date: Mon, 17 Dec 1990 21:39
23 lines
1117 bytes
Why does the ARM (in section 5) allow some non-traditional
(w.r.t. ANSI-C) lvalues?

For instance the following statements are legal in C++, but not C:
    (++i) = 2;		// ARM 5.3.1
    (i += 3) = 5;	// ARM 5.17

But the following is not:
    (i++) = 7;		// ARM 5.2.5

And the following are not explicitly specified:
    (-i) = 11;		// ARM 5.3
    (i + 13) = 17;	// ARM 5.7

The usefulness of such constructs seems limited.  (My guess
is that the intent was to allow various user defined operator
overloadings to return lvalues.  This is not a good reason
since section 5 explicitly does not apply to overloaded
operators (the commentary even reiterates the point).)

Hopefully the standard will explicitly state the lvalue-ness
of all expressions.
Technical Details
Message-ID: <11552@goofy.Apple.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!scott

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!scott
From: scott@Apple.COM (scott douglass)
Newsgroups: comp.std.c++
Subject: Leapin' lvalues
Keywords: lvalue
Message-ID: <11552@goofy.Apple.COM>
Date: 17 Dec 90 21:39:45 GMT
Distribution: comp
Organization: Apple Computer Inc., Cupertino, CA
Lines: 23