<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-17885055.post4131892205849324539..comments</id><updated>2008-02-08T23:58:09.178+01:00</updated><title type='text'>Comments on The Julipedia: Blog: C++: Little teaser about std::set</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.julipedia.org/feeds/4131892205849324539/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html'/><author><name>Julio Merino</name><uri>http://www.blogger.com/profile/08233346614736256024</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17885055.post-2660636326283060196</id><published>2008-02-08T23:58:00.000+01:00</published><updated>2008-02-08T23:58:00.000+01:00</updated><title type='text'>Yeah, I ran into the same problem while working on...</title><content type='html'>Yeah, I ran into the same problem while working on a school project. It definitely  caught me off guard.&lt;BR/&gt;&lt;BR/&gt;This is fun, you should do it more often :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/2660636326283060196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/2660636326283060196'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202511480000#c2660636326283060196' title=''/><author><name>John</name><uri>http://www.blogger.com/profile/14829017628725137647</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-3038102403469704800</id><published>2008-02-08T23:42:00.000+01:00</published><updated>2008-02-08T23:42:00.000+01:00</updated><title type='text'>John: Bingo!This piece of code bothered me this mo...</title><content type='html'>John: Bingo!&lt;BR/&gt;&lt;BR/&gt;This piece of code bothered me this morning for a while until I came to this same conclusion.  I assumed it had to work because it surely does when you use, for example, a vector instead of a set, but when you think about it you realize it cannot work :-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/3038102403469704800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/3038102403469704800'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202510520000#c3038102403469704800' title=''/><author><name>Julio M. Merino Vidal</name><uri>http://www.blogger.com/profile/08233346614736256024</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11711662837553049744'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-2150203190862478953</id><published>2008-02-08T23:09:00.000+01:00</published><updated>2008-02-08T23:09:00.000+01:00</updated><title type='text'>The reason why *iter is read only is because the e...</title><content type='html'>The reason why *iter is read only is because the elements in the set are also keys. If you were able to modify *iter, then you run the risk of having two or more of the same key.&lt;BR/&gt;&lt;BR/&gt;Also, the elements are sorted (I think), so modifying *iter would mean the set would have to sort itself after every iteration.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/2150203190862478953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/2150203190862478953'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202508540000#c2150203190862478953' title=''/><author><name>John</name><uri>http://www.blogger.com/profile/14829017628725137647</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-1822307101543311735</id><published>2008-02-08T22:51:00.000+01:00</published><updated>2008-02-08T22:51:00.000+01:00</updated><title type='text'>Well, this is surprise for me as well, but seems t...</title><content type='html'>Well, this is surprise for me as well, but seems that iterator type doesn't have to be mutable.&lt;BR/&gt;&lt;BR/&gt;I don't have the ISO standard by hand, but SGI STL documentation says that for Container, X::iterator must be an 'input iterator', which is not required to be mutable.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/1822307101543311735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/1822307101543311735'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202507460000#c1822307101543311735' title=''/><author><name>lrrr</name><uri>http://www.blogger.com/profile/12742106367384624657</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-952323763800170084</id><published>2008-02-08T22:04:00.000+01:00</published><updated>2008-02-08T22:04:00.000+01:00</updated><title type='text'>John: Exactly, that's why it fails.Now the real qu...</title><content type='html'>John: Exactly, that's why it fails.&lt;BR/&gt;&lt;BR/&gt;Now the real question is: why is *iter read-only if the code is using an iterator and not a const_iterator?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/952323763800170084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/952323763800170084'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202504640000#c952323763800170084' title=''/><author><name>Julio M. Merino Vidal</name><uri>http://www.blogger.com/profile/08233346614736256024</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11711662837553049744'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-6643380951465978249</id><published>2008-02-08T19:50:00.000+01:00</published><updated>2008-02-08T19:50:00.000+01:00</updated><title type='text'>The problem comes with i++ in your second for loop...</title><content type='html'>The problem comes with i++ in your second for loop.&lt;BR/&gt;&lt;BR/&gt;Since i is an int&amp; and you assigned it *iter, it is the same as using *iter. *iter is read only, so that is why the increment breaks the build.&lt;BR/&gt;&lt;BR/&gt;Just a guess :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/6643380951465978249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/6643380951465978249'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202496600000#c6643380951465978249' title=''/><author><name>John</name><uri>http://www.blogger.com/profile/14829017628725137647</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-17885055.post-7370585986970371698</id><published>2008-02-08T19:21:00.000+01:00</published><updated>2008-02-08T19:21:00.000+01:00</updated><title type='text'>Julio! You should know... you are missing the 'inc...</title><content type='html'>Julio! You should know... you are missing the 'include' and the 'main' XD&lt;BR/&gt;&lt;BR/&gt;C++ is sometimes too weird...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/7370585986970371698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17885055/4131892205849324539/comments/default/7370585986970371698'/><link rel='alternate' type='text/html' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html?showComment=1202494860000#c7370585986970371698' title=''/><author><name>Lluis</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.julipedia.org/2008/02/c-little-teaser-about-stdset.html' ref='tag:blogger.com,1999:blog-17885055.post-4131892205849324539' source='http://www.blogger.com/feeds/17885055/posts/default/4131892205849324539' type='text/html'/></entry></feed>