Thread View: comp.std.c++
1 messages
1 total messages
Started by scott douglass
Mon, 17 Dec 1990 21:39
Leapin' lvalues
Author: scott douglass
Date: Mon, 17 Dec 1990 21:39
Date: Mon, 17 Dec 1990 21:39
23 lines
1117 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads