<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Differnece between oprator[] and &quot;at&quot; function of vector</title>
	<atom:link href="http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/feed/" rel="self" type="application/rss+xml" />
	<link>http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/</link>
	<description>on programming tips and trending topics...</description>
	<lastBuildDate>Sun, 29 Jan 2012 09:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: bobobobo</title>
		<link>http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/comment-page-1/#comment-2075</link>
		<dc:creator>bobobobo</dc:creator>
		<pubDate>Wed, 24 Jun 2009 16:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://sarathc.wordpress.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/#comment-2075</guid>
		<description>sweet post!  I like your writing style.</description>
		<content:encoded><![CDATA[<p>sweet post!  I like your writing style.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: out of bound vector [] access. &#171; Computing Life</title>
		<link>http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/comment-page-1/#comment-2074</link>
		<dc:creator>out of bound vector [] access. &#171; Computing Life</dc:creator>
		<pubDate>Wed, 10 Oct 2007 14:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://sarathc.wordpress.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/#comment-2074</guid>
		<description>[...] what should happen when out of bound access is made? Once you have made up your mind, check out the rational behind the way STL [...]</description>
		<content:encoded><![CDATA[<p>[...] what should happen when out of bound access is made? Once you have made up your mind, check out the rational behind the way STL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: S a r a t h</title>
		<link>http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/comment-page-1/#comment-2073</link>
		<dc:creator>S a r a t h</dc:creator>
		<pubDate>Thu, 14 Jun 2007 12:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://sarathc.wordpress.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/#comment-2073</guid>
		<description>Thanks.
KD,
it&#039;s an exception on accessing invalid memory. That&#039;s why it&#039;s getting inside the common catch block. It could be any error, not the bug of vector, suppose if the copy contructor or operator= of the type we are passing to the vector could also throw the exception, or any other function. It can be anything which causes the exception. but it&#039;s not possible for us to catch anything related out of range access of vector.
As I said in the post, If you are using Visual Studio 2005 and you disabled the checked iterators, the exception will not be caught in the common block. It will simply crash.

The behavior of the same may differ vendor to vendor and as per the standard there&#039;s no exception specification for operator[]
HTH</description>
		<content:encoded><![CDATA[<p>Thanks.<br />
KD,<br />
it&#8217;s an exception on accessing invalid memory. That&#8217;s why it&#8217;s getting inside the common catch block. It could be any error, not the bug of vector, suppose if the copy contructor or operator= of the type we are passing to the vector could also throw the exception, or any other function. It can be anything which causes the exception. but it&#8217;s not possible for us to catch anything related out of range access of vector.<br />
As I said in the post, If you are using Visual Studio 2005 and you disabled the checked iterators, the exception will not be caught in the common block. It will simply crash.</p>
<p>The behavior of the same may differ vendor to vendor and as per the standard there&#8217;s no exception specification for operator[]<br />
HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kd</title>
		<link>http://codereflect.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/comment-page-1/#comment-2072</link>
		<dc:creator>kd</dc:creator>
		<pubDate>Thu, 14 Jun 2007 08:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://sarathc.wordpress.com/2007/06/12/differnece-between-oprator-and-at-function-of-vector/#comment-2072</guid>
		<description>nice post.
what happen if we use like this
try{ v[1000] = 10; }
catch(...){}

v is  vector of zero size.
I still get the exception in this case.

try{ v[1000] ; }   //In this case no exception, i think since we are not accessing thing

catch(...){}</description>
		<content:encoded><![CDATA[<p>nice post.<br />
what happen if we use like this<br />
try{ v[1000] = 10; }<br />
catch(&#8230;){}</p>
<p>v is  vector of zero size.<br />
I still get the exception in this case.</p>
<p>try{ v[1000] ; }   //In this case no exception, i think since we are not accessing thing</p>
<p>catch(&#8230;){}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

