<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Opt for Pre-incrementing Iterators</title>
	<link>http://magnetiq.com/2006/08/26/opt-for-pre-incrementing-iterators/</link>
	<description>Ates Goral's Personal Playground and Project Repository</description>
	<pubDate>Mon, 12 May 2008 04:14:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Ates Goral</title>
		<link>http://magnetiq.com/2006/08/26/opt-for-pre-incrementing-iterators/#comment-2028</link>
		<pubDate>Thu, 26 Apr 2007 19:20:37 +0000</pubDate>
		<guid>http://magnetiq.com/2006/08/26/opt-for-pre-incrementing-iterators/#comment-2028</guid>
					<description>Here's how pre &amp; post increment operators are implemented for the STL list const_iterator:

&lt;pre&gt;&lt;code lang=&quot;x-jash.cplusplus&quot;&gt;
const_iterator&amp; operator++()
	{	// preincrement
	_Ptr = _Nextnode(_Ptr);
	return (*this);
	}

const_iterator operator++(int)
	{	// postincrement
	const_iterator _Tmp = *this;
	++*this;
	return (_Tmp);
	}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s how pre &#038; post increment operators are implemented for the STL list const_iterator:</p>
<pre><code lang="x-jash.cplusplus">
const_iterator&#038; operator++()
	{	// preincrement
	_Ptr = _Nextnode(_Ptr);
	return (*this);
	}

const_iterator operator++(int)
	{	// postincrement
	const_iterator _Tmp = *this;
	++*this;
	return (_Tmp);
	}
</code></pre>
]]></content:encoded>
				</item>
</channel>
</rss>
