<?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 - Stephan T. Lavavej - Core C++, 4 of n</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n/RSS"></atom:link>
	<image>
		<url>http://media.ch9.ms/ch9/ea7e/fbf53e6f-514c-44a9-ba4e-bfd55e20ea7e/STLCCSeries4_220.jpg</url>
		<title>Channel 9 - Stephan T. Lavavej - Core C++, 4 of n</title>
		<link></link>
	</image>
	<description>In part 4, Stephan teaches us about Virtual Functions. In parts 1-3, we learned about compile-time constructs. Now, we enter the realm of runtime. STL spends some&amp;nbsp;time discussing inheritance and a bit about access control. Tune in. Learn. See part 1: Name LookupSee part 2: Template Argument DeductionSee part 3: Overload ResolutionSee part 5: Explicit and Partial Specialization </description>
	<link></link>
	<language>en</language>
	<pubDate>Wed, 22 May 2013 13:58:35 GMT</pubDate>
	<lastBuildDate>Wed, 22 May 2013 13:58:35 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[awesome.<br>Thanks for your work.<p>posted by Alex Krycek</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812444126729340</link>
		<pubDate>Wed, 22 Aug 2012 15:00:12 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812444126729340</guid>
		<dc:creator>Alex Krycek</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Wow!!</p><p>Thank you for this lecture video.</p><p>&nbsp;</p><p>posted by Spetum</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812461501759924</link>
		<pubDate>Wed, 22 Aug 2012 15:29:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812461501759924</guid>
		<dc:creator>Spetum</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Yesterday we got the first C&#43;&#43; &amp;&amp; Beyond 2012 and today Stephan. Life is being kind to native developers... long may this state of affairs continue. Thanks as always Stephan for another awesome video.</p><p>posted by tomkirbygreen</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812498727730521</link>
		<pubDate>Wed, 22 Aug 2012 16:31:12 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812498727730521</guid>
		<dc:creator>tomkirbygreen</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[I hope this makes C&#43;&#43; more intuitive and give it a new life. I often hear people saying C&#43;&#43; is dead but after listening to Herb Sutter&#39;s argument about the future of C&#43;&#43;. C&#43;&#43;11 is way to go. Keep up the good work. I hope C&#43;&#43;11 have more support for weak memory models. <p>posted by vsbrar</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812613857171788</link>
		<pubDate>Wed, 22 Aug 2012 19:43:05 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812613857171788</guid>
		<dc:creator>vsbrar</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[What surprised me most about virtual functions is that pure virtual function can have implementation&#47;body &#40;but not at the same place as its declaration&#40;&#63;&#41;&#47;definition&#40;&#63;&#41;&#41;&#58; http&#58;&#47;&#47;ideone.com&#47;RdnGm<br><br>Marek<p>posted by Marek</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812701007818328</link>
		<pubDate>Wed, 22 Aug 2012 22:08:20 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812701007818328</guid>
		<dc:creator>Marek</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Seems like a long time since the 3rd part. Great show! &nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />&nbsp;</p><p>posted by yanshuai</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812764883170189</link>
		<pubDate>Wed, 22 Aug 2012 23:54:48 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634812764883170189</guid>
		<dc:creator>yanshuai</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>I would still like to see that &quot;parameter passing best practices&quot; episode <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /> But if it's gotta be core C&#43;&#43;, how about &quot;sequence points are dead, long live the sequenced-before relationship&quot;?</p><p>posted by NotFredSafe</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813025671921489</link>
		<pubDate>Thu, 23 Aug 2012 07:09:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813025671921489</guid>
		<dc:creator>NotFredSafe</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Thanks Stephan, for another great lecture. <br><br>Too bad time ran out, because it would have been nice to show that the NVI idiom also applies to static polymorphism using the CRTP pattern with a class template &#96;Base&#60;Derived&#62;&#96;. Here you can explicitly downcast the this-pointer in the &#96;Base&#96; class and access a &#96;Derived&#96; class&#39;s private implementation, once again showing that access control is orthogonal to visibility.<p>posted by rhalbersma</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813070813450940</link>
		<pubDate>Thu, 23 Aug 2012 08:24:41 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813070813450940</guid>
		<dc:creator>rhalbersma</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Is there a transcript and&#47;or write-up of the lectures for reference purposes&#63; Failing that how about time tags on the video&#63;<br>These mindblowingly valuable lectures require proper indexing.<p>posted by Philhippus</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813290990082924</link>
		<pubDate>Thu, 23 Aug 2012 14:31:39 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813290990082924</guid>
		<dc:creator>Philhippus</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Great stuff again, thanks.  I find I use NVI a lot also although I never realised it had a common name.  Usually this is because I want to make sure that a specific piece of code is always called before &#40;or after&#41; that part of the behaviour which is customisable by the derived class implementor.  So a trivial example would be if I want to allow derived classes to customize a function, but I also want to ensure that the function&#39;s argument values are always logged to a file before calling the &#39;real&#39; code.<br><br>The only annoying part of this pattern is that you have to come up with a slightly different function name for the virtual function... not a big fan of pre-pending &#39;do&#39; although the other convention I&#39;ve seen is &#42;appending&#42; &#39;Ex&#39; which is also a bit rubbish&#33;<p>posted by GlassKey</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813550667038588</link>
		<pubDate>Thu, 23 Aug 2012 21:44:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813550667038588</guid>
		<dc:creator>GlassKey</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Thanks for watching, everyone. That's what keeps me going!</p><p>vsbrar&gt; I hope C&#43;&#43;11 have more support for weak memory models.</p><p>C&#43;&#43;11's &lt;atomic&gt;, which we shipped in VC11 RTM, fully supports weak memory models like ARM's. The atomics wisely default to sequential consistency, but if you want relaxed/acquire/release/etc. semantics, they are available.</p><p>Marek&gt; What surprised me most about virtual functions is that pure virtual function can have implementation/body</p><p>Correct. &quot;Pure&quot; means &quot;must be overridden&quot; (if you want to get a concrete class).</p><p>yanshuai&gt; Seems like a long time since the 3rd part.</p><p>There'll be another gap between this and Part 5 - I'll be on vacation for a couple weeks.</p><p>NotFredSafe&gt; I would still like to see that &quot;parameter passing best practices&quot; episode</p><p>That definitely counts as part of the Core Language - the only thing I am avoiding in this series is directly covering the Standard Library.</p><p>I basically do episodes when I feel inspired enough about a topic to talk about it for 45&#43; minutes in a single take. Now that I'm basically done with &quot;how a function call works&quot;, I can turn my attention to other matters.</p><p>&gt; But if it's gotta be core C&#43;&#43;, how about &quot;sequence points are dead, long live the sequenced-before relationship&quot;?</p><p>That is exceedingly subtle, and has almost no effect for single-threaded code. I figure that anyone experienced enough to make sense of the topic doesn't need me to explain it to them.</p><p>rhalbersma&gt; Too bad time ran out</p><p>I'll never have enough time to cover every area of a topic (I could probably talk about the integral types for 3 solid hours), so my goal is to cover the basics and sketch out the structure of things so people are prepared to learn more, especially as they encounter issues similar to what I've talked about.</p><p>Philhippus&gt; Is there a transcript and/or write-up of the lectures for reference purposes? Failing that how about time tags on the video?</p><p>Every episode is an undiluted stream of consciousness (mine is filled with cats meowing), but maybe Charles has some resources here.</p><p>GlassKey&gt; The only annoying part of this pattern is that you have to come up with a slightly different function name for the virtual function...</p><p>The Standard conventionally uses a &quot;do_&quot; prefix. If I saw an &quot;Ex&quot; suffix, I would expect that (like in the Windows API) it referred to an extended form of an ordinary function (in C&#43;&#43; this is properly achieved by overloading, but C doesn't have that mechanism).</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813628870448698</link>
		<pubDate>Thu, 23 Aug 2012 23:54:47 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813628870448698</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[The override keyword is a nice solution for the case where I think I override but I don&#39;t.<br>If I need to change the signature of the function in the base class, I wish I could rely on the compiler to give me an error for all the derived class that are now broken &#40;which it will if override is used everywhere&#41;. However, I can&#39;t rely on that unless I know the override keyword is used everywhere...<br>I wish we had a compiler warning when the override keyword is missing. Something we might get in Visual Studio someday&#63;<p>posted by Vincent</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813817504725653</link>
		<pubDate>Fri, 24 Aug 2012 05:09:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813817504725653</guid>
		<dc:creator>Vincent</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Cool lecture, though vector&#60;shared_ptr&#60;&#62;&#62; made me go &#58;&#47; - because of the performance of shared_ptr, esp if there are many of them. <br>BTW Stephen IDK if you can comment but FB released folly&#40;parts that I want to ask you about are optimizations of STL - does VS does something similar to stuff that folly does&#41;.<br>To save your time I extracted cool STL features&#58;<br>1. &#40;allocator here is malloc&#40;&#41; if i get it correctly&#41;&#34;It doesn&#39;t take a rocket surgeon to figure out that an allocator- aware std&#58;&#58;vector would be a marriage made in heaven&#58; the vector could directly request blocks of &#34;perfect&#34; size from the allocator so there would be virtually no slack in the allocator. Also, the entire growth strategy could be adjusted to work perfectly with allocator&#39;s own block growth strategy.&#34;<br>2. &#34;In order to allow fast relocation without risk, fbvector uses a trait folly&#58;&#58;IsRelocatable defined in &#34;folly&#47;Traits.h&#34;. By default, folly&#58;&#58;IsRelocatable&#58;&#58;value conservatively yields false. If you know that your type Widget is in fact relocatable, go right after Widget&#39;s definition and write this&#58;<br><br>    &#47;&#47; at global namespace level<br>    namespace folly &#123;<br>    struct IsRelocatable&#60;Widget&#62; &#58; boost&#58;&#58;true_type &#123;&#125;&#59;<br>    &#125;<br>&#34;<br>https&#58;&#47;&#47;github.com&#47;facebook&#47;folly&#47;blob&#47;master&#47;folly&#47;docs&#47;FBVector.md<br>I guess you cant use 2. in STL, but you can use if for MS libs that use STL.<br><br>Regarding the memcyp trick I was wondering... is it possible using TMP to determine if a user class is memcypable&#40;by making it memcpyable if every member is memcpyable, so class X&#123;vector&#60;string&#62; vs&#59; int y&#59; &#125; is memcpyable &#41;. <br><br>Again great lecture, one cool thing would be auto. I know ppl think it is super simple, but actually it isnt. <br>also you could reshow your trick question regarding for each and auto from GN conf. &#58;D<p>posted by Ivan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814324646100470</link>
		<pubDate>Fri, 24 Aug 2012 19:14:24 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814324646100470</guid>
		<dc:creator>Ivan</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Vincent&gt; I wish we had a compiler warning when the override keyword is missing.</p><p>That would warn about the whole world, at least at first.</p><p>Ivan&gt; Cool lecture, though vector&lt;shared_ptr&lt;&gt;&gt; made me go :/ - because of the performance of shared_ptr, esp if there are many of them.</p><p>shared_ptr isn't free, but it isn't horribly inefficient.</p><p>&gt; &quot;an allocator- aware std::vector would be a marriage made in heaven&quot;</p><p>Our std::vector and std::allocator (powered by new/malloc/HeapAlloc) don't conspire together. That could improve performance, but I wouldn't expect it to lead to dramatic gains.</p><p>&gt; is it possible using TMP to determine if a user class is memcypable</p><p>std::is_trivially_copyable does this.</p><p>&gt; class X{vector&lt;string&gt; vs; int y; } is memcpyable</p><p>It is not - vector has a nontrivial copy constructor.</p><p>&gt; Again great lecture, one cool thing would be auto.</p><p>That's a good idea, thanks. I'll think about it.</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814401883296106</link>
		<pubDate>Fri, 24 Aug 2012 21:23:08 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814401883296106</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[&#62; That would warn about the whole world, at least at first<br><br>That would for people who enable the warning, which means it&#39;d be opt-in... I don&#39;t see that as a bad thing...<br><br>Those warnings are pretty mechanical to fix&#58; assuming the code is otherwise correct all you have to do is add &#34;override&#34; on the line. It gets you to a state where a class of mistake can&#39;t happen&#58;<br>- adding a method to a derived class without realizing it already exists as virtual on the base class &#40;so overriding it when it&#39;s not intended&#41;<br>- adding a virtual method on a base class when one of the derived classes already has a function with the same signature<br>- changing the signature of a function on the base class and forgetting to update the derived class &#40;this is what override is designed to fix, but how can I rely on it as the author of the base class if the keyword is optional&#63; I could with a warning...&#41;<p>posted by Vincent</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814467986099734</link>
		<pubDate>Fri, 24 Aug 2012 23:13:18 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814467986099734</guid>
		<dc:creator>Vincent</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[&#64;STL tnx for the answers...<br>1&#41;regarding vector and memcopyable ... what I wrote was wrong, I was thinking about swap and move. For example if I now call std&#58;&#58;sort on vector whose elements are   class X&#123;vector&#60;string&#62; vs&#59; int y&#59; &#125; is<br>a&#41; compiler smart enough to figure out that swap can be done by memcpy<br>a1&#41; if not can programmer tell him that without manually writing sort function.<br><br>2&#41; regarding auto, if you do it please mention<br>const vector&#60;double&#62;&#38; fun&#40;&#41;&#59;<br>auto x &#61; fun&#59;&#47;&#47; x is not a const ref<p>posted by Ivan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814926197561255</link>
		<pubDate>Sat, 25 Aug 2012 11:56:59 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634814926197561255</guid>
		<dc:creator>Ivan</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Great video, thanks a lot!</p><p>One question about slicing: You suggest forbidding any assignment operator and copy constructor in the polymorphic base class. However, how would you in that situation implement the derived class's copy constructor and assignment operator?</p><p>I was always under the impression that slicing was precisely required to say <code>Base(rhs)</code> and <code>Base::operator=(rhs);</code> in the derived implementations.</p><p>posted by KerrekSB</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634816675759892385</link>
		<pubDate>Mon, 27 Aug 2012 12:32:55 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634816675759892385</guid>
		<dc:creator>KerrekSB</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Ivan&gt; For example if I now call std::sort on vector whose elements are class X{vector&lt;string&gt; vs; int y; }</p><p>C&#43;&#43;11's rvalue references v3 (not implemented in VC11 RTM) will automatically generate move ctors/assigns for X. Then swap() and sort() will automatically take advantage of them.</p><p>KerrekSB&gt; However, how would you in that situation implement the derived class's copy constructor and assignment operator?</p><p>You don't; they remain disabled.</p><p>The solution here is a virtual clone() function, which you can invoke on a Base * and get a properly-cloned Derived.</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817671041237133</link>
		<pubDate>Tue, 28 Aug 2012 16:11:44 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817671041237133</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>@<a href="/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634813628870448698">STL</a>: Thanks for the lecture! // Awesome as always <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>Regarding the NVI -- what are some good examples where we'd prefer &quot;protected&quot; access over &quot;private&quot; (and vice versa)?</p><p>I guess it boils down to choosing between protected-virtuals [23.3] and private-virtuals [23.4] in the C&#43;&#43; FAQ, but unfortunately there's no direct comparison in there:<br><a href="http://www.parashift.com/c++-faq-lite/protected-virtuals.html">http&#58;&#47;&#47;www.parashift.com&#47;c&#43;&#43;-faq-lite&#47;protected-virtuals.html</a></p><p>Another question -- is NVI the same as or different from the Template Method pattern?</p><p>This source calls TM pattern &quot;more generic&quot; (without specifying what's more generic about it):<br><a href="http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Non-Virtual_Interface">http&#58;&#47;&#47;en.wikibooks.org&#47;wiki&#47;More_C&#37;2B&#37;2B_Idioms&#47;Non-Virtual_Interface</a></p><p>While this one seems to show TM as exactly the same thing:<br><a href="http://www.parashift.com/c++-faq-lite/private-virtuals.html">http&#58;&#47;&#47;www.parashift.com&#47;c&#43;&#43;-faq-lite&#47;private-virtuals.html</a></p><p>posted by Matt_PD</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817752254686961</link>
		<pubDate>Tue, 28 Aug 2012 18:27:05 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817752254686961</guid>
		<dc:creator>Matt_PD</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Great lecture, thanks Stephan.<p>posted by Fran</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817949544741932</link>
		<pubDate>Tue, 28 Aug 2012 23:55:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634817949544741932</guid>
		<dc:creator>Fran</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[&#64;STL<br>&#58;<br>&#34;C&#43;&#43;11&#39;s rvalue references v3 &#40;not implemented in VC11 RTM&#41; will automatically generate move ctors&#47;assigns for X. Then swap&#40;&#41; and sort&#40;&#41; will automatically take advantage of them.&#34;.<br>I had a really weird experience playing around with poor mans&#39;s v3 RVRs&#40;memcpy&#41;  &#40;VC11 RC&#41;and hit really weird problems so I was wondering if you could explain it &#40;for understanding of VS purposes, not to debug my code, like I said I did it for fun&#41;&#58;<br>http&#58;&#47;&#47;pastebin.com&#47;0NP1v0XL<br>So to recap code comments&#58;<br>1. in release mode memcpy specialized swap makes code a LOT faster. <br>2. in Debug mode with specialized swap I get runtime errors- if I was forced to guess&#58; Debug runtime machinery doesnt deal ok with memcpy swap implementation. &#58;D <br>3. in Debug mode by manually implementing Ctor error goes away. &#40;this is really really weird&#41;.<br>Ignore the lack of functionality of the code, it is just some random operations in ctor... to make element different from each other and to make debugging easier. <br>Disclaimer &#58; I reviewed my code to double check that it isnt some stupid mistake, but still it is possible that is the cause. <br><br><br><p>posted by Ivan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634819795700791034</link>
		<pubDate>Fri, 31 Aug 2012 03:12:50 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634819795700791034</guid>
		<dc:creator>Ivan</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Awesome lecture, really gave me insight on the way to structure things.<br><br>I would be very interested in further discussion about avoiding inheritance for the sake of it. I see a lot of C&#43;&#43; developers that do &#34;java C&#43;&#43;&#34; as I call it, with huge boilerplate classes hierarchies when something much more elegant could be conceived. I find it hard to find C&#43;&#43; resources that don&#39;t advocate this &#34;inheritance based programming&#34;, and I&#39;d love to hear your best practices about that.<p>posted by Chewie</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634820562922624075</link>
		<pubDate>Sat, 01 Sep 2012 00:31:32 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634820562922624075</guid>
		<dc:creator>Chewie</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[These core c&#43;&#43; video aren&#39;t being posted on visual c&#43;&#43; blog now&#63; . I see just 2 videos of this listed there. thanks to google for linking me to this link &#58;&#41;<br><p>posted by gh0st0nride</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634822078807171382</link>
		<pubDate>Sun, 02 Sep 2012 18:38:00 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634822078807171382</guid>
		<dc:creator>gh0st0nride</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Matt_PD&gt; Regarding the NVI -- what are some good examples where we'd prefer &quot;protected&quot; access over &quot;private&quot; (and vice versa)?</p><p>You'd want &quot;protected&quot; when you'd want the base class to provide an implementation that derived classes can invoke as a helper. (The base implementation can be marked pure if you want to require derived classes to override it. Of course, if the base implementation is protected, pure, and implemented, a derived class can override it and just call the base implementation.)</p><p>&gt; Another question -- is NVI the same as or different from the Template Method pattern?</p><p>I don't really pay attention to design patterns as I don't find them to be especially useful. I've heard that the NVI is one way to implement the &quot;Template Method&quot; pattern, which sounds right to me.</p><p>Ivan&gt; I had a really weird experience playing around with poor mans's v3 RVRs(memcpy)</p><p>That's incorrect and dangerous. In the absence of rvalue references v3, you should write memberwise moves (with std::move).</p><p>In C&#43;&#43;98/03/11 (the terminology has changed, but the principles have remained the same), only PODs (Plain Old Data) can be bit-blasted with memcpy(). Classes with copy constructors/etc. are &quot;non-POD&quot; and attempting to memcpy them triggers undefined behavior. std::vector is definitely non-POD and therefore you cannot memcpy it.</p><p>Chewie&gt; I find it hard to find C&#43;&#43; resources that don't advocate this &quot;inheritance based programming&quot;, and I'd love to hear your best practices about that.</p><p>See Effective C&#43;&#43;, Third Edition by Scott Meyers. It has a whole chapter on inheritance, and an item (38, looking at the table of contents - my copy is at home) dedicated to when you should use composition instead of inheritance.</p><p>In general, I use inheritance when I need the one thing it does uniquely and well: runtime polymorphism. Otherwise, I'll reach for other C&#43;&#43; mechanisms first. For example, templates are better at compile-time polymorphism. What &quot;compile-time polymorphism&quot; means is when I want to write something that can work with many different types, but those types are all known at compile-time. The STL is the most obvious and famous example of this. vector&lt;T&gt; is a container of an arbitrary type T, but that type can be specified at compile-time. Making it a template allows it to handle these arbitrary types, without incurring any runtime overhead (everything is stamped out by the compiler and then inlined away, ideally).</p><p>gh0st0nride&gt; These core c&#43;&#43; video aren't being posted on visual c&#43;&#43; blog now?</p><p>I write those link-posts when I have time (I just got back from 2 weeks of vacation). I'll try to remember to write them for videos in the future.</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634830158189740202</link>
		<pubDate>Wed, 12 Sep 2012 03:03:38 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634830158189740202</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Here&#39;s a wish for a future lecture, which doesn&#39;t fit into the current Core C&#43;&#43; series, but which I would like to get your insights on anyway. How about showing us your development setup and routine&#63; So e.g. teach us about your VC editor&#47;compiler&#47;linker settings, any shortcuts&#47;plugins&#47;external libraries you often use, perhaps some advanced debugging tricks, precompiled headers, etc. etc. In short, anything that would increase productivity&#47;build times for the rest of us. <br><p>posted by rhalbersma</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634834739552050182</link>
		<pubDate>Mon, 17 Sep 2012 10:19:15 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634834739552050182</guid>
		<dc:creator>rhalbersma</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[Hi&#33;<br><br>I&#39;m sorry if I&#39;m too off-topic here, but I like C&#43;&#43; and there is something on my mind&#58;<br>The MSVC C&#43;&#43;11 compliance is far too weak, and I have to admit that I expected more for VC11.<br><br>I love the things the standard committee guys did to the language, and I am trying to incorporate the new features into my way of thinking in C&#43;&#43; instead viewing them as extensions.<br>That works really well with GCC or Clang, but when it comes to Visual Studio, I have this moment way too often where I think &#34;WTF&#63; Why does this &#36;41T not compile&#63;&#33;&#33;&#34;.<br><br><br>I&#39;m sort of an open source guy and I&#39;m all for supporting multiple platforms and compilers and I believe it&#39;s healthy to compile your code with several compilers, but I arrived at the point where I&#39;m just about to drop support for MSVC in all my programs, regard it as broken and use MinGW for Windows compilation instead.<br><br>&#64;STL&#58;<br>Are your core compiler collegues finally working on C&#43;&#43;, or do they still have &#34;other assignments&#34;&#63;<br>Can you make a guesstimation of when the &#34;in-between-release&#34; of the compiler that Herb Sutter mentioned in GoingNative will arrive&#63;<br><br>How do you find this situation&#63; I could imagine you&#39;d quite love to see more features to play with &#40;variadic templates maybe&#63;&#41;.<p>posted by Alexander</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634837567727877091</link>
		<pubDate>Thu, 20 Sep 2012 16:52:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634837567727877091</guid>
		<dc:creator>Alexander</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>if overloaded operators are just syntactic sugar,<br>please explain, why there is differences in the following code?</p><p>class X{<br>public:<br>X&amp; operator% (const X&amp;) {<br>std::cout &lt;&lt; &quot;member fun\n&quot;;<br>return *this;<br>}<br>void f();<br>};</p><p>X&amp; operator%( X&amp; a, int)<br>{<br>std::cout &lt;&lt; &quot;global fun\n&quot;;<br>return a;<br>}</p><p>void X::f()<br>{<br>X&amp; a = *this;<br>a % 1; // calls non-member function<br>operator%(a, 1);//compiler error<br>}</p><p>thanks in advance <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>posted by gaya</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634841969856072151</link>
		<pubDate>Tue, 25 Sep 2012 19:09:45 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634841969856072151</guid>
		<dc:creator>gaya</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[&#64;gaya&#58; if you recall episode 1 &#40;name lookup&#41;, it should be clear that once the compiler finds operator&#37; &#40;even one with a different signature, which will be resolved during overload resolution&#41; in the scope of class X, it stops looking for any other operator&#37; in enclosing scopes. To call the free operator&#37;, you can use &#58;&#58;operator&#37;&#40;a,1&#41;&#59;<p>posted by rhalbersma</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634842460528194429</link>
		<pubDate>Wed, 26 Sep 2012 08:47:32 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634842460528194429</guid>
		<dc:creator>rhalbersma</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>I filmed Part 5, &quot;Specializations&quot;, on Tuesday! :-&gt;</p><p>rhalbersma&gt; How about showing us your development setup and routine?</p><p>You'll see some of this in Part 6. My environment is very austere - I use a plain text editor and I drive the compiler from the command line. (When building test cases, I manually invoke &quot;cl /EHsc /nologo /W4&quot;. When building the compiler and libraries, I use our internal build system on the command line. At home, I use makefiles on the command line.)</p><p>Alexander&gt; Are your core compiler collegues finally working on C&#43;&#43;, or do they still have &quot;other assignments&quot;?</p><p>The compiler team is working on C&#43;&#43;11 Core Language features right now. In Part 6, I'll show off an internal build of the compiler (driven from the command line, since IDE integration is a separate chunk of work). I'd love to say which features are being implemented, but I'm not allowed to do that yet.</p><p>&gt; Can you make a guesstimation of when the &quot;in-between-release&quot; of the compiler that Herb Sutter mentioned in GoingNative will arrive?</p><p>We can't ever talk about release dates before they're publicly announced, sorry.</p><p>&gt; How do you find this situation? I could imagine you'd quite love to see more features to play with (variadic templates maybe?).</p><p>I've often mentioned that as an STL maintainer, my work is greatly complicated by the lack of variadic templates. We've been imitating them with clever-but-horrible macro schemes since the VC9 Feature Pack.</p><p>gaya&gt; if overloaded operators are just syntactic sugar</p><p>They are syntactic sugar for ordinary function calls, but they obey various special rules, especially for overload resolution.</p><p>rhalbersma is correct, but to explain further:</p><p>Given &quot;a % 1&quot;, N3376 13.3.1.2 [over.match.oper]/3 explains that &quot;For a unary operator @ with an operand of a type whose cv-unqualified version is T1, and for a binary operator @ with a left operand of a type whose cv-unqualified version is T1 and a right operand of a type whose cv-unqualified version is T2, three sets of candidate functions, designated member candidates, nonmember candidates and built-in candidates, are constructed as follows:&quot;. That's why both the member and non-member functions are considered by overload resolution (as a programmer would naturally expect).</p><p>Given &quot;operator%(a, 1)&quot; which is written as an ordinary function call, 3.4.1 [basic.lookup.unqual]/8 notices that you're in a member function body, so as soon as it finds X::operator% it stops. In general, C&#43;&#43; really likes calling member functions, which is why the unqualified name lookup rules are written like this. The Argument-Dependent Lookup rules also follow this preference - both unqualified lookup and ADL are performed, and both sets of declarations found are tossed into the overload resolution arena, *except* that if unqualified lookup finds a class member, the ADL set is emptied out (3.4.2 [basic.lookup.argdep]/3 has the full story and lists a couple of other conditions).</p><p>This is actually relevant in your scenario. Given the arguments (a, 1) the argument a is of type X which activates ADL. X lives in the global namespace, so ADL would search the global namespace and find operator%(X&amp;, int) there - except that ADL has been disabled because unqualified lookup found a class member.</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634843937369749530</link>
		<pubDate>Fri, 28 Sep 2012 01:48:56 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634843937369749530</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Dear @STL, thanks a lot for YOUR comprehensive explanation <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>posted by gaya</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634844385701926995</link>
		<pubDate>Fri, 28 Sep 2012 14:16:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634844385701926995</guid>
		<dc:creator>gaya</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Great Video again!<br><br>Charles, any idea when the next video will be uploaded? <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>posted by Tominator2005</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634845967763689720</link>
		<pubDate>Sun, 30 Sep 2012 10:12:56 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634845967763689720</guid>
		<dc:creator>Tominator2005</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Thanks for all the very informative shows.</p><p><br>Note sure if this is the best place but I wanted to suggest std::function and related topics for a show. I have just started replacing a bunch of old style functor stuff with this and have run into a lack of documentation, for instance answering a question like &quot;what does a std::function actually store and how does that relate to copying/assignment of std::function objects&quot; seems hard to find out without reading C&#43;&#43; library code which is not the easiest code to read!</p><p>posted by davidhunter22</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634854084496292395</link>
		<pubDate>Tue, 09 Oct 2012 19:40:49 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634854084496292395</guid>
		<dc:creator>davidhunter22</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Hi STL,</p><p>I'm programming a directory iterator and I'm getting a error message, but not from my program, from the filesystem header; saying &quot;&nbsp;'_Ptr' : is not a member of 'std::tr2::sys::basic_directory_entry&lt;_Path&gt;'.<br><br>my call to path is <pre class="brush: text">sys::path fullpath = 
        sys::system_complete(sys::path(argv[1]));
</pre><br><br>Thanks in advance for any assistance</p><p>Tom</p><p>posted by Tominator2005</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634855563279148176</link>
		<pubDate>Thu, 11 Oct 2012 12:45:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634855563279148176</guid>
		<dc:creator>Tominator2005</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>davidhunter22&gt; I wanted to suggest std::function and related topics for a show.</p><p>I'll try to remember that for when I start doing videos on the STL again. If I forget, remind me. :-&gt;</p><p>&gt; I have just started replacing a bunch of old style functor stuff with this</p><p>std::function is extremely useful, but it shouldn't be overused. For example, if you can template an algorithm on functor type, that is more efficient than having it take a std::function (which has inherent overheads).</p><p>&gt; &quot;what does a std::function actually store</p><p>Magic. But really, it just stores a copy of the functor you've given it.</p><p>&gt; and how does that relate to copying/assignment of std::function objects&quot;</p><p>The stored functor, including any state within, will be copied/assigned.</p><p>&gt; seems hard to find out without reading C&#43;&#43; library code which is not the easiest code to read!</p><p>You shouldn't look at the guts of our implementation. If MSDN seems insufficient, you can look at the Working Paper for maximum accuracy.</p><p>Tominator2005: This compiles for me with VC11 RTM:</p><p><pre class="brush: cpp">C:\Temp&gt;type meow.cpp
#include &lt;filesystem&gt;
using namespace std;
using namespace std::tr2::sys;

int main(int argc, char * argv[]) {
    (void) argc;
    path fullpath = system_complete(path(argv[1]));
}

C:\Temp&gt;cl /EHsc /nologo /W4 /MTd meow.cpp
meow.cpp

C:\Temp&gt;</pre></p><p>Send me a self-contained repro (like this) at <a href="mailto:stl@microsoft.com">stl@microsoft.com</a> and I'll take a look.</p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634855861425405109</link>
		<pubDate>Thu, 11 Oct 2012 21:02:22 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634855861425405109</guid>
		<dc:creator>STL</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>@STL: Great stuff as usual, I love this core C&#43;&#43; series, please keep it coming !</p><p>Best Regards,</p><p>Russell</p><p>posted by Gob00st</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634857663697209995</link>
		<pubDate>Sat, 13 Oct 2012 23:06:09 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634857663697209995</guid>
		<dc:creator>Gob00st</dc:creator>
	</item>
	<item>
		<title>Re: Stephan T. Lavavej - Core C++, 4 of n</title>
		<description>
			<![CDATA[<p>Part 5: <a href="http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-5-of-n">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-5-of-n</a></p><p>posted by STL</p>]]>
		</description>
		<link>http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634867139681947998</link>
		<pubDate>Wed, 24 Oct 2012 22:19:28 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-4-of-n#c634867139681947998</guid>
		<dc:creator>STL</dc:creator>
	</item>
</channel>
</rss>