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++ > question on lis...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 13 Topic 43800 of 47563
Post > Topic >>

question on list<int&>

by "subramanian100in@[EMAIL PROTECTED] India" <subramanian100in@[EMAIL PROTECTED] > Mar 10, 2008 at 10:48 PM

For vector and deque, the memory layout may be contiguous in which
case we cannot have array of references and so we cannot have
vector<int&> and deque<int&>. Am I correct?

However I am unable to create

list<int&> c;

Though 'list' does not involve contiguous memory layout, the above is
disallowed because we cannot reseat a reference(in the sense that we
cannot rebind a reference to a different object through assignment
operator). Is the reasoning correct; or is there some other reason for
disallowing list of references.

Kindly clarify.

Thanks
V.Subramanian
 




 13 Posts in Topic:
question on list
"subramanian100in@[E  2008-03-10 22:48:40 
Re: question on list
Ian Collins <ian-news@  2008-03-11 18:54:00 
Re: question on list
Kai-Uwe Bux <jkherciue  2008-03-11 04:50:20 
Re: question on list
Ron Natalie <ron@[EMAI  2008-03-12 10:35:13 
Re: question on list
Ian Collins <ian-news@  2008-03-13 08:05:05 
Re: question on list
Kai-Uwe Bux <jkherciue  2008-03-12 15:28:12 
Re: question on list
Ron Natalie <ron@[EMAI  2008-03-12 20:05:17 
Re: question on list
James Kanze <james.kan  2008-03-13 03:04:11 
Re: question on list
Ian Collins <ian-news@  2008-03-14 08:42:58 
Re: question on list
James Kanze <james.kan  2008-03-13 03:21:36 
Re: question on list
Kai-Uwe Bux <jkherciue  2008-03-13 06:33:41 
Re: question on list
James Kanze <james.kan  2008-03-13 03:24:48 
Re: question on list
James Kanze <james.kan  2008-03-13 06:23:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sun Sep 7 8:10:50 CDT 2008.