Topic: Defect: non-lvalue v. rvalue
Author: gdr@cs.tamu.edu (Gabriel Dos Reis)
Date: Fri, 25 Mar 2005 23:08:02 GMT Raw View
thedl0-usenet1@yahoo.com (Daryle Walker) writes:
| [Apologies if this was already reported.]
|
| This comes from a thread I started in comp.lang.c++.moderated with
| article {1gtisb8.1g99vu39aav4N%thedl0-usenet1@yahoo.com}
|
| The "this" expression is marked as a "non-lvalue" in 9.3.2/1. Another
| poster said that the phrase "non-lvalue" also appears in footnote 49. I
| heard of lvalues and rvalues, and I thought that non-lvalues were some
| unmentioned third category. However, 3.10/1 only gives two categories
| for expressions, lvalues and rvalues. This means that "non-lvalue" is
| probably some archaic synonym for "rvalue" (assuming that the word
| "rvalue" was invented after "lvalue" was used).
Basically, yes. "rvalue" is an invention for C++98 (meaning non-lvalue).
C90, on which C++98 was based, uses "lvalue" and "non-lvalue".
--
Gabriel Dos Reis
gdr@cs.tamu.edu
Texas A&M University -- Department of Computer Science
301, Bright Building -- College Station, TX 77843-3112
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]
Author: thedl0-usenet1@yahoo.com (Daryle Walker)
Date: Wed, 23 Mar 2005 19:45:59 GMT Raw View
[Apologies if this was already reported.]
This comes from a thread I started in comp.lang.c++.moderated with
article {1gtisb8.1g99vu39aav4N%thedl0-usenet1@yahoo.com}
The "this" expression is marked as a "non-lvalue" in 9.3.2/1. Another
poster said that the phrase "non-lvalue" also appears in footnote 49. I
heard of lvalues and rvalues, and I thought that non-lvalues were some
unmentioned third category. However, 3.10/1 only gives two categories
for expressions, lvalues and rvalues. This means that "non-lvalue" is
probably some archaic synonym for "rvalue" (assuming that the word
"rvalue" was invented after "lvalue" was used).
If non-lvalues are rvalues, then the terms should be changed to "rvalue"
for clarity. If there really is a third expression category, neither
lvalue nor rvalue, then that needs to be explained somewhere instead
(and given a better name than "non-lvalue," since it would also be a
non-rvalue).
--
Daryle Walker
Mac, Internet, and Video Game Junkie
dwalker07 AT snet DOT net
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]