<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank/rss"></atom:link>
	<image>
		<url>http://media.ch9.ms/ch9/b648/6ebef5c4-c798-4856-8e28-88439928b648/CB2012HerbSutterYouDontKnow_220.jpg</url>
		<title>Channel 9 - C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<link></link>
	</image>
	<description>Herb Sutter presents&amp;nbsp;a &amp;quot;startling realization he had about C&amp;#43;&amp;#43;11&amp;quot;, and&amp;nbsp;he thinks it may be a bit startling for others too. Tune in. This was filmed at C&amp;#43;&amp;#43; and Beyond 2012Download Herb&#39;s slides for this session. Abstract: In addition to the many new C&amp;#43;&amp;#43;11 features that everyone&#39;s listing, it has dawned on me over the winter that there&#39;s actually another major change that isn&#39;t being talked about anywhere, or even being listed as a change in C&amp;#43;&amp;#43;11 at all as far as I know, because I and other key experts and committee members I&#39;ve asked didn&#39;t fully realize that we altered the basic meaning of not one but two fundamental keywords in C&amp;#43;&amp;#43;. It&#39;s a change that has profound consequences, that rewrites and/or invalidates several pieces of pre-C&amp;#43;&amp;#43;11 design guidance, and that&#39;s directly related to writing solid code in a concurrent and parallel world. This isn&#39;t just an academic change, either — everyone is going to have to learn and apply the new C&amp;#43;&amp;#43;11 guidance that we&#39;ll cover in this session. I plan to talk about it first at C&amp;amp;B, in a session tentatively titled as above — I&#39;ll fill in the keywords later.&amp;nbsp;You may already guess a few keyword candidates based on the description above, and here&#39;s a final hint: You&#39;ll hardly find two C&amp;#43;&amp;#43; keywords that are older, or whose meanings are more changed from C&amp;#43;&amp;#43;98 to C&amp;#43;&amp;#43;11. (No, they aren&#39;t&amp;nbsp;auto and register.) </description>
	<link></link>
	<language>en</language>
	<pubDate>Fri, 24 May 2013 19:32:29 GMT</pubDate>
	<lastBuildDate>Fri, 24 May 2013 19:32:29 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>does c&#43;&#43;11 provide yield return and extension methods as we know them from C#?&nbsp; Does it do away with header files?</p><p>&nbsp;</p><p>posted by SteveRichter</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925673097656340</link>
		<pubDate>Mon, 31 Dec 2012 16:15:09 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925673097656340</guid>
		<dc:creator>SteveRichter</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>Thanks <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>posted by felix9</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925673424920516</link>
		<pubDate>Mon, 31 Dec 2012 16:15:42 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925673424920516</guid>
		<dc:creator>felix9</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Sweet&#33; Thanks a lot for sharing.<p>posted by Christian Semmler</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925681979287636</link>
		<pubDate>Mon, 31 Dec 2012 16:29:57 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925681979287636</guid>
		<dc:creator>Christian Semmler</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Applying const_cast to class members can cause undefined if the object itself was defined as const. Mutable doesn&#39;t have this problem.<br><br>struct Foo &#123;<br>  int value&#59;<br>  void Mutate&#40;&#41; const &#123;<br>    const_cast&#60;int&#38;&#62;&#40;value&#41; &#61; 42&#59;<br>  &#125;<br>&#125;&#59;<br><br>struct Bar &#123;<br>  mutable int value&#59;<br>  void Mutate&#40;&#41; const &#123;<br>    value &#61; 42&#59;<br>  &#125;<br>&#125;&#59;<br><br>const Foo foo &#61; &#123;&#125;&#59;<br>const Bar bar &#61; &#123;&#125;&#59;<br><br>int main&#40;&#41; &#123;<br>  foo.Mutate&#40;&#41;&#59;  &#47;&#47; Undefined Behavior.<br>  bar.Mutate&#40;&#41;&#59;  &#47;&#47; OK.<br>&#125;<p>posted by Roman Perepelitsa</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925770912670507</link>
		<pubDate>Mon, 31 Dec 2012 18:58:11 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925770912670507</guid>
		<dc:creator>Roman Perepelitsa</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>Ah the perfect end to 2012! This has been the best year for native code at Microsoft in well over a decade. Going into 2013 please keep up the investment in native, there has been much ground lost in both market and mindshare over the past ~12 years, but I passionately believe you guys can turn this around. Deliver the RTM parts previewed in the VC&#43;&#43; November CTP and you're well on your way to having IMO the best C&#43;&#43; 11 dev experience out there.</p><p>posted by tomkirbygreen</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925783073349720</link>
		<pubDate>Mon, 31 Dec 2012 19:18:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925783073349720</guid>
		<dc:creator>tomkirbygreen</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[@<a href="/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634925783073349720">dot_tom</a>: We're not letting up!! C<p>posted by Charles</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926037163432211</link>
		<pubDate>Tue, 01 Jan 2013 02:21:56 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926037163432211</guid>
		<dc:creator>Charles</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>Why is const needed anyway?&nbsp; C# does not have the concept.</p><p>Another C&#43;&#43; request ...&nbsp; enum class.&nbsp; Have a built in ToString method or enable enum class to have member functions, or add extension methods to the language.&nbsp; The purpose being to enable enum specific code, like Parse and ToString, to be called using dot notation from an enum instance.</p><p>enum class Colors { red, white, blue } ;<br>Colors color = Colors::red ;<br>auto textColorName = color.ToString( )<br>auto anotherColor = Colors::Parse( textColorName ) ;</p><p>Bigger picture. Give me a native version of C#. Or enhance the struct handling capabilites of C#. ( C# cannot efficiently handle PIDLs used by windows shell. ) Microsoft to this day says that windows shell code written in C# is unsupported. A C# like native code language would be awesome.</p><p>&nbsp;</p><p>posted by SteveRichter</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926547474410577</link>
		<pubDate>Tue, 01 Jan 2013 16:32:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926547474410577</guid>
		<dc:creator>SteveRichter</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Steve, the whole point of C&#43;&#43; is to give you the tools to make such a class. Perhaps you can come up with an implementation and propose it as part of the standard STL&#63;<p>posted by Tianyu</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926605079590048</link>
		<pubDate>Tue, 01 Jan 2013 18:08:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926605079590048</guid>
		<dc:creator>Tianyu</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>Well, that's an interesting insight. It's going to take me a moment to wrap my head around this <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />. I keep coming up with ways to invalidate it, but then go &quot;oh, no, it still holds...&quot;</p><p>posted by PhrostByte</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926721204961388</link>
		<pubDate>Tue, 01 Jan 2013 21:22:00 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926721204961388</guid>
		<dc:creator>PhrostByte</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Maybe a silly question. But, if mutable &#61;&#61; const &#40;&#61;&#61; thread-safe&#41;<br><br>Shouldn&#39;t the following mean the same&#63;<br><br>mutable std&#58;&#58;mutex&#60;int&#62; m1&#59;<br>const std&#58;&#58;mutex&#60;int&#62; m2&#59;<br><br>If not, why&#63;<p>posted by petke</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926810076391501</link>
		<pubDate>Tue, 01 Jan 2013 23:50:07 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926810076391501</guid>
		<dc:creator>petke</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;petke - I believe the difference is in how you state intent to the compiler.<br><br>When you have a const object, you&#39;re telling the compiler to forbid use of all non-const functions&#59; the compiler can, in that manner, enforce the const&#47;thread-safe guarantees that the class writer gave you.<br><br>When you call something mutable under the new definition, you&#39;re stating &#39;I trust the author of this type to have made it entirely synchronized&#47;thread-safe&#39;. The compiler will then not restrict what methods you can call.<br><br>I would argue that mutable is a keyword indicating your trust in the author, whereas const is about the author providing compiler-enforceable guarantees for the user.<br><br>Code example&#58;<br>struct myStruct &#123;<br>  const mutex m1&#59;<br>  mutable mutex m2&#59;<br><br>  void f1&#40;&#41; const &#123; m1.lock&#40;&#41;&#59; &#125; &#47;&#47;COMPILE-TIME ERROR<br>  void f2&#40;&#41; const &#123; m2.lock&#40;&#41;&#59; &#125;<br>&#125;&#59;<br><br>int main&#40;&#41; &#123;<br>  const myStruct x&#59;<br>  x.f2&#40;&#41;&#59; &#47;&#47;OK - author claims that myStruct is internally synchronized<br><br>  return 0&#59;<br>&#125;<br><p>posted by turck3</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927098864675196</link>
		<pubDate>Wed, 02 Jan 2013 07:51:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927098864675196</guid>
		<dc:creator>turck3</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;turck3 Thanks. I still have an uneasy feeling about the new definition.  If const is thread-safe. Why isn&#39;t the method std&#58;&#58;mutex&#58;&#58;lock defined as const &#40;as its internally synchronized&#41;&#63;<br><br><p>posted by petke</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927315550998649</link>
		<pubDate>Wed, 02 Jan 2013 13:52:35 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927315550998649</guid>
		<dc:creator>petke</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>I think Herb is wrong. Const implies thread-safe, but thread-safe does not imply const, so the two are not equal/equivalent.</p><p>Concurrent containers etc will certainly be thread-safe but not all functions will be const.</p><p>posted by XTF</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927323753274643</link>
		<pubDate>Wed, 02 Jan 2013 14:06:15 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927323753274643</guid>
		<dc:creator>XTF</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Doesn&#39;t this mean that &#34;mutable&#34; is an attribute of class rather than attribute of class&#39; usage&#63; In other words, we may be better off saying <br><br>mutable class Mutex&#123;&#47;&#42;...&#42;&#47;&#125;&#59;<br><br>rather than <br><br>class A &#123;<br>  mutable Mutex m&#59;<br>&#125;&#59;<br><br><br>&#63;<br><p>posted by Arkadiy Belousov</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927331540869271</link>
		<pubDate>Wed, 02 Jan 2013 14:19:14 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927331540869271</guid>
		<dc:creator>Arkadiy Belousov</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Comment Permalink" href="/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634926605079590048">20 hours&nbsp;ago</a></p><p>Steve, the whole point of C&#43;&#43; is to give you the tools to make such a class.</p><p>&nbsp;</p></div></blockquote><p></p><p>but in practice Tianyu, you end up getting some inscrutable compile errors.</p><p>Find the error in this code.&nbsp; Note the bullshit compile error.</p><p></p><pre class="brush: text">  void Tester2( unique_ptr&lt;std::wstring&gt; pString )  {  }  void CallTester2( )  {    unique_ptr&lt;std::wstring&gt; pString ;    Tester2( pString ) ;  }</pre><p></p><p>&nbsp;</p><p>&nbsp;4&nbsp;IntelliSense: &quot;std::unique_ptr&lt;_Ty, _Dx&gt;::unique_ptr(const std::unique_ptr&lt;_Ty, _Dx&gt;::_Myt &amp;) [with _Ty=std::wstring, _Dx=std::default_delete&lt;std::wstring&gt;]&quot; (declared at line 1447 of &quot;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory&quot;) is inaccessible&nbsp;c:\SkyDrive\democpp\Tester\Tester.cpp&nbsp;379&nbsp;14&nbsp;Tester<br>Error&nbsp;3&nbsp;error C2248: 'std::unique_ptr&lt;_Ty&gt;::unique_ptr' : cannot access private member declared in class 'std::unique_ptr&lt;_Ty&gt;'&nbsp;c:\skydrive\democpp\tester\tester.cpp&nbsp;382&nbsp;1&nbsp;Tester</p><p>posted by SteveRichter</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927338347774433</link>
		<pubDate>Wed, 02 Jan 2013 14:30:34 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927338347774433</guid>
		<dc:creator>SteveRichter</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;PhrostByte it is very easy to invalidate this, constant member functions do not enforce referentially transparency &#40;pure functions&#41; even in C&#43;&#43;11. You can still modify global or &#40;class&#41; static unsynchronized variables in constant member functions or modify unsynchronized data members marked as mutable.<br><br>You can say this is a bug&#47;undefined behavior &#40;in the context of concurrent&#47;parallel code&#41; but this is an issue with the language&#47;library if the standard say that constant member functions must be side-effect free but the language does not enforce this thus the compiler will never enforce this.<br><br>From my point of view const does not guarantee thread safety, this is only a promise that can be silently broken. This is not particular useful.<br><br>This change in C&#43;&#43;11 is actually a breaking but silent change to existing code and you have no help from the language&#47;compiler to find and fix any buggy code which is not C&#43;&#43;11 compliant.<br><p>posted by snkkid</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927366037561280</link>
		<pubDate>Wed, 02 Jan 2013 15:16:43 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927366037561280</guid>
		<dc:creator>snkkid</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>@<a href="/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927338347774433">SteveRichter</a>: Clang gives a more readable diagnostic message:</p><p><pre class="brush: text">source.cpp:6:79: error: call to deleted constructor of 'std::unique_ptr&lt;std::wstring&gt;'
void CallTester2( ) { std::unique_ptr&lt;std::wstring&gt; pString ; Tester2( pString ) ; }
                                                                     ^~~~~~~
note: function has been explicitly marked deleted here unique_ptr(const unique_ptr&amp;) = delete;
</pre></p><p>See: <a href="http://liveworkspace.org/code/1zPqd0$1">http&#58;&#47;&#47;liveworkspace.org&#47;code&#47;1zPqd0&#36;1</a></p><p>In other words, copy constructor is deleted -- in other words, unique_ptr is non-copyable.</p><p>BTW, regarding enums, you can always implement something like this: <a href="http://www.ishani.org/web/2012/fancy-c-enums/">http&#58;&#47;&#47;www.ishani.org&#47;web&#47;2012&#47;fancy-c-enums&#47;</a></p><p>posted by Matt_PD</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927377961465716</link>
		<pubDate>Wed, 02 Jan 2013 15:36:36 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927377961465716</guid>
		<dc:creator>Matt_PD</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Thanks Herb&#33; Great lecture and explanation. Looking forward to the rest of the lectures as they get released.<p>posted by Gary</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927678718055343</link>
		<pubDate>Wed, 02 Jan 2013 23:57:51 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927678718055343</guid>
		<dc:creator>Gary</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Comment Permalink" href="/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634927366037561280">2 days&nbsp;ago</a></p><p>@PhrostByte it is very easy to invalidate this, constant member functions do not enforce referentially transparency (pure functions) even in C&#43;&#43;11. You can still modify global or (class) static unsynchronized variables in constant member functions or modify unsynchronized data members marked as mutable.<br><br>You can say this is a bug/undefined behavior (in the context of concurrent/parallel code) but this is an issue with the language/library if the standard say that constant member functions must be side-effect free but the language does not enforce this thus the compiler will never enforce this.<br><br>From my point of view const does not guarantee thread safety, this is only a promise that can be silently broken. This is not particular useful.<br><br>This change in C&#43;&#43;11 is actually a breaking but silent change to existing code and you have no help from the language/compiler to find and fix any buggy code which is not C&#43;&#43;11 compliant.</p><p></p></div></blockquote><p></p><p>In other words, it's no different from most everything else in C&#43;&#43; -- helping you a good deal but still not &quot;enforcing&quot; anything, allowing you to do whatever the hell you want in the end <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>A compiler may not be able to catch and warn about all instances of broken code (you're right, this <em>is</em> a breaking change), but there's a lot of room here for it to help.</p><p>posted by PhrostByte</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634929477528854865</link>
		<pubDate>Sat, 05 Jan 2013 01:55:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634929477528854865</guid>
		<dc:creator>PhrostByte</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>Thanks!</p><p>posted by DmitriyVilkov</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634930727398240121</link>
		<pubDate>Sun, 06 Jan 2013 12:38:59 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634930727398240121</guid>
		<dc:creator>DmitriyVilkov</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Apparently I&#39;m confused. I always though &#34;const&#34; meant &#34;immutable&#34;&#59; now Herb is telling us that &#34;const&#34; means &#34;mutable&#34;&#63; Wha..&#63; Do an American English dictionary search for &#34;mutable&#34;, por favor...<p>posted by Anonymous Coward</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634931941706958399</link>
		<pubDate>Mon, 07 Jan 2013 22:22:50 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634931941706958399</guid>
		<dc:creator>Anonymous Coward</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[<p>@<a href="/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634931941706958399">Anonymous Coward</a>: Watch and actually listen to what Herb says...<br>C</p><p>posted by Charles</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634932935481020171</link>
		<pubDate>Wed, 09 Jan 2013 01:59:08 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634932935481020171</guid>
		<dc:creator>Charles</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Very interesting talk&#33; Thanks a lot for sharing it.<br><br>I would think that saying that both mutable and const &#42;imply&#42; thread safe is better than stating they equal thread safe. After all, const also implies &#34;not allowed to perform non-const operations on&#34; while mutable implies the opposite, so mutable &#33;&#61; const. But that&#39;s just a nitpicking comment &#59;&#41;. The presentation is very insightful.<p>posted by Andre Offringa</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634933144317292737</link>
		<pubDate>Wed, 09 Jan 2013 07:47:11 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634933144317292737</guid>
		<dc:creator>Andre Offringa</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[Thanks for this excellent talk, Herb &#33;<br><br>I have a question though. This mutable mutex story seems kind ow awkward to me. <br><br>You said that &#34;const&#34; now means &#34;thread-safe&#34;, and that &#34;mutable&#34; means &#34;known to be thread-safe&#34;. If the mutex is thread-safe, as you said in your talk, shouldn&#39;t all its methods be declared const &#63; Therefore, the mutex would not have to be declared mutable.<p>posted by kip</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634938849867156795</link>
		<pubDate>Tue, 15 Jan 2013 22:16:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634938849867156795</guid>
		<dc:creator>kip</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;Kip &#58; When you say a thing is a const you&#39;re saying &#34;Look, think of this as immutable &#47; assume I will not modify it&#34; and for most cases it will be immutable&#47;you will not modify. BUT if you modify it you have to guarantee that you will not mess concurrency&#47;synchronization. <br><br>And, in most cases, the compiler will not let you directly break your promise of immutable&#47;non-modify. For that you have to explicitly cast the const thing to a non-const thing. OR you can say that thing is in fact mutable.  <br><br>Now when you say something is mutable you&#39;re saying &#34;Look, this is not immutable but I guarantee that it will not cause problems with concurrency&#47;synchronization, it&#39;s already synchronized&#34;<br><br>Const -&#62;   it&#39;s immutable, and as such thread-safe.<br>Mutable -&#62; it&#39;s mutable, but let me use as immutable because I guarantee it&#39;s thread-safe.<br><br><p>posted by Alessandro Stamatto</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634940475986159612</link>
		<pubDate>Thu, 17 Jan 2013 19:26:38 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634940475986159612</guid>
		<dc:creator>Alessandro Stamatto</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[hi herb&#33;<br><br>for me the point in this &#39;const&#47;mutable&#39; talk is, that you missed in your introducion a &#39;const&#39;&#58;<br><br>&#35;include &#60;utility&#62;<br>&#35;include &#60;future&#62;<br>&#35;include &#60;vector&#62;<br>using namespace std&#59;<br>&#47;&#42;&#42;&#47;const&#47;&#42;&#42;&#47; vector&#60;int&#62; v&#40;1000&#41;&#59; &#47;&#47; &#60;--<br>int main&#40;&#41; &#123;<br> auto x &#61; async&#40;&#91;&#47;&#42;&#42;&#47;&#38;&#47;&#42;&#42;&#47;&#93;&#123; pair&#60;int,vector&#60;int&#62;&#62; z&#123; 1, v &#125;&#59; &#125;&#41;&#59;<br> auto y &#61; async&#40;&#91;&#47;&#42;&#42;&#47;&#38;&#47;&#42;&#42;&#47;&#93;&#123; pair&#60;int,vector&#60;int&#62;&#62; z&#123; 2, v &#125;&#59; &#125;&#41;&#59;<br> x.wait&#40;&#41;&#59; y.wait&#40;&#41;&#59;<br>&#125;<br><br>without this &#47;&#42;&#42;&#47;const&#47;&#42;&#42;&#47;, you have to &#39;know&#39; that nobody modifies &#39;v&#39;.<br><br>am i right&#63; <br><br>best regards<br>andreas pfaffenbichler<p>posted by Andreas Pfaffenbichler</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634940925778643990</link>
		<pubDate>Fri, 18 Jan 2013 07:56:17 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634940925778643990</guid>
		<dc:creator>Andreas Pfaffenbichler</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;Alessandro,<br><br>Thanks for your answer, Alessandro. However, I can&#39;t say I fully agree, though I understand your point.<br><br>The conclusion of what you said is &#34;Const -&#62; it&#39;s immutable, and as such thread-safe.&#34;<br>This is precisely what puzzles me. Since a mutex is inherently thread-safe &#40;thanks to some &#42;internal&#42; mechanism&#41;, why doesn&#39;t it expose its constness to the outside world &#63;<br>I think that the stl standard breaks the encapsulation rule here.<br>Basically, when you say that the lock method of a mutex is non-const, you&#39;re saying&#58;<br>&#34;OK, by some internal mechanism, I have to modify some private variables of the mutex, in order to make it thread-safe, therefore it is non-const&#34;. Basically, you&#39;re exposing the internal working of the mutex by saying its lock method is non const, though it&#39;s thread safe.<br><br>I hope I am clear in my explanation. Feel free to send me an email to further discuss this point &#40;first-name dot last-name at gmail.com&#41;<p>posted by Kip Coul</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634941864405703322</link>
		<pubDate>Sat, 19 Jan 2013 10:00:40 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634941864405703322</guid>
		<dc:creator>Kip Coul</dc:creator>
	</item>
	<item>
		<title>Re: C++ and Beyond 2012: Herb Sutter - You don&#39;t know [blank] and [blank]</title>
		<description>
			<![CDATA[&#64;Kip Coul<br><br>I think the point is that const is not the same as thread safe. const implies thread safe, but thread safe does not imply const.<br><br>The mutex is not const, and in fact that is what allows it to synchronize, if the mutex is not locked you need to lock it to synchronize, but you can&#39;t change the state of the mutex if it is const &#40;despite of what Herb might have said, const still means immutable&#41;.<br><br>That&#39;s where mutable comes in, because mutable &#40;just like const&#41; implies thread safe. But while const implies it since something that can&#39;t change by definition is thread safe, mutable is thread safe since you do you some form of synchronization.<br><br>I think the key to understanding is the fact that thread safe &#33;&#61; const, you can use other means of synchronization &#40;for example a mutex&#41;. And if your class is not const then the mutex is not const either, so if the mutex&#39;s functions are non-const that&#39;s OK.<p>posted by Erik W</p>]]>
		</description>
		<link>http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634966617291406542</link>
		<pubDate>Sun, 17 Feb 2013 01:35:29 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank#c634966617291406542</guid>
		<dc:creator>Erik W</dc:creator>
	</item>
</channel>
</rss>