<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/microsoft.public.vc.stl</id>
  <title type="text">microsoft.public.vc.stl Google Group</title>
  <subtitle type="text">
  Microsoft Visual C newsgroup.
  </subtitle>
  <link href="/group/microsoft.public.vc.stl/feed/atom_v1_0_msgs.xml" rel="self" title="microsoft.public.vc.stl feed"/>
  <updated>2010-01-04T21:52:10Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>sasha</name>
  <email>a...@fox.net</email>
  </author>
  <updated>2010-01-04T21:52:10Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/4c54bc2be2af3210?show_docid=4c54bc2be2af3210</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/4c54bc2be2af3210?show_docid=4c54bc2be2af3210"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  OK understood, thanks for clearing up the confusion. Btw, I enjoyed &lt;br&gt; reading your blog on the rvalue references and experimenting with them. &lt;br&gt; Hope you don&#39;t mind that I was using a different compiler for that :)
  </summary>
  </entry>
  <entry>
  <author>
  <name>Stephan T. Lavavej [MSFT]</name>
  <email>s...@microsoft.com</email>
  </author>
  <updated>2010-01-04T21:40:47Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/54ff4c6b595db220?show_docid=54ff4c6b595db220</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/54ff4c6b595db220?show_docid=54ff4c6b595db220"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  Actually, we&#39;re working with Dinkumware closer than ever before. During &lt;br&gt; VC8, Microsoft&#39;s sources diverged significantly from Dinkumware&#39;s master &lt;br&gt; sources. In VC10 we got back in sync. This, combined with the introduction &lt;br&gt; of many C++0x features like rvalue references, looks like a major rewrite of
  </summary>
  </entry>
  <entry>
  <author>
  <name>sasha</name>
  <email>a...@fox.net</email>
  </author>
  <updated>2010-01-04T20:14:07Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/714fde30da445c5d?show_docid=714fde30da445c5d</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/714fde30da445c5d?show_docid=714fde30da445c5d"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  Stephen, &lt;br&gt; So it&#39;s not Dinkum in VC10 anymore?
  </summary>
  </entry>
  <entry>
  <author>
  <name>Stephan T. Lavavej [MSFT]</name>
  <email>s...@microsoft.com</email>
  </author>
  <updated>2010-01-04T19:15:05Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/5ebccdfa23ade11c?show_docid=5ebccdfa23ade11c</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/5ebccdfa23ade11c?show_docid=5ebccdfa23ade11c"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  I built a time machine, so I answered your question over half a year ago: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; (Note that #2 and #4 have been reversed.) &lt;br&gt; To add to the story very briefly: &lt;br&gt; Modifying set elements was always considered a squirreley thing to do, so
  </summary>
  </entry>
  <entry>
  <author>
  <name>Igor Tandetnik</name>
  <email>itandet...@mvps.org</email>
  </author>
  <updated>2009-12-31T18:47:46Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/104b507f52d15931/71f705884b552a65?show_docid=71f705884b552a65</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/104b507f52d15931/71f705884b552a65?show_docid=71f705884b552a65"/>
  <title type="text">Re: catching push_back exception</title>
  <summary type="html" xml:space="preserve">
  For me, your code eventually throws a bad_alloc exception which is successfully caught by the appropriate catch clause. How does your experience differ? &lt;br&gt; Do you have exception handling turned off, by any chance? Check Project | Properties | C/C++ | Code Generation | Enable C++ Exceptions.
  </summary>
  </entry>
  <entry>
  <author>
  <email></email>
  </author>
  <updated>2009-12-31T16:24:27Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/104b507f52d15931/0a71643e28971f1d?show_docid=0a71643e28971f1d</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/104b507f52d15931/0a71643e28971f1d?show_docid=0a71643e28971f1d"/>
  <title type="text">catching push_back exception</title>
  <summary type="html" xml:space="preserve">
  I tried your suggestion with the simple program above and it did not work. That is, I had: &lt;br&gt; for(theint=0; theint &amp;lt; 20000000000; theint++) &lt;br&gt; { &lt;br&gt; try &lt;br&gt; { &lt;br&gt; thevector.push_back(theint); &lt;br&gt; } &lt;br&gt; catch ( const std::bad_alloc &amp;amp; e ) &lt;br&gt; { &lt;br&gt; return 0; &lt;br&gt; } &lt;br&gt; catch ( const std::exception &amp;amp; e ) &lt;br&gt; { &lt;br&gt; return 0; &lt;br&gt; } &lt;br&gt; The program crashed (threw an exception) on the push_back(*) call. Am I missing something simple? Any idea why the exception would not be handled? BTW, the value of theint when it crashed was 67108864. Thanks.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Leigh Johnston</name>
  <email>le...@i42.co.uk</email>
  </author>
  <updated>2009-12-25T17:10:02Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/9f10be05d30bd019?show_docid=9f10be05d30bd019</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/9f10be05d30bd019?show_docid=9f10be05d30bd019"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  Take a look at &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://i42.co.uk/stuff/mutable_set.htm&quot;&gt;[link]&lt;/a&gt; if you like for my &lt;br&gt; full take on this. &lt;br&gt; /Leigh
  </summary>
  </entry>
  <entry>
  <author>
  <name>Leigh Johnston</name>
  <email>le...@i42.co.uk</email>
  </author>
  <updated>2009-12-24T16:57:17Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/66b4f25893addb2c?show_docid=66b4f25893addb2c</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/66b4f25893addb2c?show_docid=66b4f25893addb2c"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  I always think mutable is a bit of a hack as const setter functions seem &lt;br&gt; somehow dodgy to me, instead I have just written the following: &lt;br&gt; template &amp;lt;typename T, typename Pr = std::less&amp;lt;typename T::key_type const&amp;gt;, &lt;br&gt; typename Alloc = std::allocator&amp;lt;std::pair&amp;lt;typen ame T::key_type const, T&amp;gt; &amp;gt; &amp;gt; &lt;br&gt; class mutable_set : public std::map&amp;lt;typename T::key_type, T, Pr, Alloc&amp;gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>David Wilkinson</name>
  <email>no-re...@effisols.com</email>
  </author>
  <updated>2009-12-23T12:39:53Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/f1826f4d5e0a70c3?show_docid=f1826f4d5e0a70c3</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/f1826f4d5e0a70c3?show_docid=f1826f4d5e0a70c3"/>
  <title type="text">Re: std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  Following code compiles on VC9 but not VC10: &lt;br&gt; class A &lt;br&gt; { &lt;br&gt; int m_n; &lt;br&gt; public: &lt;br&gt; A(int n):m_n(n){} &lt;br&gt; void Change(){m_n++;} &lt;br&gt; bool operator &amp;lt; (const A&amp;amp; rhs) const {return m_n &amp;lt; rhs.m_n;} &lt;br&gt; int main() &lt;br&gt; { &lt;br&gt; std::set&amp;lt;A&amp;gt; mySet; &lt;br&gt; A a(1); &lt;br&gt; mySet.insert(a); &lt;br&gt; mySet.begin()-&amp;gt;Change(); &lt;br&gt; return 0; &lt;br&gt; Error message on VC10 is &lt;br&gt; error C2662: &#39;A::Change&#39; : cannot convert &#39;this&#39; pointer from &#39;const A&#39; to &#39;A &amp;amp;&#39;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Leigh Johnston</name>
  <email>le...@i42.co.uk</email>
  </author>
  <updated>2009-12-23T01:55:15Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/61b19cb6ea0a1c15?show_docid=61b19cb6ea0a1c15</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/d6c8b2cf899b8edc/61b19cb6ea0a1c15?show_docid=61b19cb6ea0a1c15"/>
  <title type="text">std::set and std::multiset element mutability</title>
  <summary type="html" xml:space="preserve">
  VC9 allows you to modify a std::set and a std::multiset&#39;s elements. This &lt;br&gt; seems to be forbidden by the c++0x standard, so is this being fixed in VC10 &lt;br&gt; or left as it is in order not to break software which is c++03 standard&#39;s &lt;br&gt; compliant (debatable) but not c++0x standard&#39;s compliant? &lt;br&gt; /Leigh
  </summary>
  </entry>
  <entry>
  <author>
  <name>Leigh Johnston</name>
  <email>le...@i42.co.uk</email>
  </author>
  <updated>2009-12-14T00:43:19Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/ebe3f9f661e26e91/86569e25c2055280?show_docid=86569e25c2055280</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/ebe3f9f661e26e91/86569e25c2055280?show_docid=86569e25c2055280"/>
  <title type="text">std::vector&lt;bool&gt;::reference ctor is not private</title>
  <summary type="html" xml:space="preserve">
  In VC++2008 the std::vector&amp;lt;bool&amp;gt;::reference constructor is not private, &lt;br&gt; according to the standard it should be. &lt;br&gt; /Leigh
  </summary>
  </entry>
  <entry>
  <author>
  <name>nebojsa vujnovic</name>
  <email>unkn...@this.is.invalid</email>
  </author>
  <updated>2009-12-02T23:28:15Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/49122b0c734c290c?show_docid=49122b0c734c290c</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/49122b0c734c290c?show_docid=49122b0c734c290c"/>
  <title type="text">Re: vc 2010 beta2 bind unique_ptr move</title>
  <summary type="html" xml:space="preserve">
  Although mechanics std::thread constructor and std::bind is similar, now &lt;br&gt; when you say it, yes contexts and definitely the purposes of std::bind &lt;br&gt; and std::thread are different. I&#39;m no longer convinced that &lt;br&gt; specialization of std::bind for std::unique_ptr just for sake of &lt;br&gt; mimicking same behavior is a good idea.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Igor Tandetnik</name>
  <email>itandet...@mvps.org</email>
  </author>
  <updated>2009-12-02T21:58:18Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/968bdd376fb0049c?show_docid=968bdd376fb0049c</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/968bdd376fb0049c?show_docid=968bdd376fb0049c"/>
  <title type="text">Re: vc 2010 beta2 bind unique_ptr move</title>
  <summary type="html" xml:space="preserve">
  That constructor is explicitly documented to support MoveConstructible arguments. The reason for the difference, I presume, is because thread is known to call its function object exactly once. &lt;br&gt; bind doesn&#39;t know that it&#39;s going to be called only once.
  </summary>
  </entry>
  <entry>
  <author>
  <name>nebojsa vujnovic</name>
  <email>unkn...@this.is.invalid</email>
  </author>
  <updated>2009-12-02T21:08:42Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/96941ccae66dcbd0?show_docid=96941ccae66dcbd0</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/96941ccae66dcbd0?show_docid=96941ccae66dcbd0"/>
  <title type="text">Re: vc 2010 beta2 bind unique_ptr move</title>
  <summary type="html" xml:space="preserve">
  actually std::thread constructor led me to that &lt;br&gt; std::thread uses similar mechanism as bind, and it will be possible to &lt;br&gt; transfer ownership using: &lt;br&gt; std::thread thr(foo, std::move(pint)); &lt;br&gt; where pint is instance of unique_ptr&amp;lt;int&amp;gt; &lt;br&gt; and I still think that this should be same as: &lt;br&gt; std::thread thr(std::bind(foo, std::move(pint)));
  </summary>
  </entry>
  <entry>
  <author>
  <name>Igor Tandetnik</name>
  <email>itandet...@mvps.org</email>
  </author>
  <updated>2009-12-02T13:41:05Z</updated>
  <id>http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/aa5bae034f4a1a86?show_docid=aa5bae034f4a1a86</id>
  <link href="http://groups.google.com/group/microsoft.public.vc.stl/browse_frm/thread/2c8257e62546e48b/aa5bae034f4a1a86?show_docid=aa5bae034f4a1a86"/>
  <title type="text">Re: vc 2010 beta2 bind unique_ptr move</title>
  <summary type="html" xml:space="preserve">
  The functional produced by std::bind stores a copy of pint (which it can do using move constructor). Its operator() would then call foo(copy_of_pint). It doesn&#39;t know enough about its parameter to infer that it should use move() in this call. So this is the part that fails. &lt;br&gt; The (draft) standard requires that parameters of std::bind be CopyConstructible, which unique_ptr isn&#39;t. So your program is invalid.
  </summary>
  </entry>
</feed>
