Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: RValue Arra...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 9809 of 9983
Post > Topic >>

Re: RValue Arrays

by Gabriel Dos Reis <gdr@[EMAIL PROTECTED] > Jul 21, 2008 at 06:10 PM

David Abrahams <dave@[EMAIL PROTECTED]
> writes:

| on Sun Jul 20 2008, rkldabs-AT-gmail.com wrote:
|
| > I was not sure about what is an rvalue array and hence a little
| > googling threw up the following site 
"http://209.85.175.104/search?q=cache:r1-djlzAyBUJ:www.open-std.org/jtc1/sc22/wg14/www/docs/n835.ps+An+lvalue+or+rvalue+of+type+%E2%80%9Carray+of+N+T%E2%80%9D&hl=en&ct=clnk&cd=1&gl=in"
| >
| > I would like to know a little more about RValue Arrays. The standard
| > as far as I have understood does not clearly explain RValue arrays.
|
| I think the only thing that makes array rvalues different from other
| rvalues is that they never exist except as a subobject of some other
| rvalue.  For example:
|
|           struct X
|           {
|               int a[20];
|           };
|
| Now
|          X()
|
| is an rvalue of type X and
|
|          X().a
|
| would be an rvalue array... if I'm not mistaken, that is ;-)

Yes, that is correct.  A disturbing point is that all components of that
rvalue array are lvalues!  This defect was inherited from C90 which
did not appreciate the existence of rvalue arrays.

-- 
Dr. Gabriel Dos Reis (gdr@[EMAIL PROTECTED]
), Assistant Professor
	      http://www.cs.tamu.edu/people/faculty/gdr
	Texas A&M University -- Department of Computer Science
	301, Bright Building -- College Station, TX 77843-3112

      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 9 Posts in Topic:
RValue Arrays
rkldabs@[EMAIL PROTECTED]  2008-07-20 18:33:40 
Re: RValue Arrays
David Abrahams <dave@[  2008-07-21 05:24:08 
Re: RValue Arrays
Oncaphillis <oncaphill  2008-07-21 14:41:13 
Re: RValue Arrays
Maxim Yegorushkin <max  2008-07-21 16:16:33 
Re: RValue Arrays
Gabriel Dos Reis <gdr@  2008-07-21 18:10:45 
Re: RValue Arrays
"Ivan A. Kosarev&quo  2008-07-23 07:28:14 
Re: RValue Arrays
"Ivan A. Kosarev&quo  2008-07-23 19:23:21 
Re: RValue Arrays
Gabriel Dos Reis <gdr@  2008-07-23 23:47:55 
Re: RValue Arrays
James Hopkin <tasjaeva  2008-07-24 13:29:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:33:37 CDT 2008.