Stephan T. Lavavej: Core C++, 1 of n

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Stephan T. Lavavej , aka STL, is back on C9! This time, STL will take us on a journey of discovery within the exciting world of Core C++. We know lots of folks are either coming back to C++, coming to C++, or have never left C++. This lecture series, in n parts, is for all of you! Only STL can make that work (novice, intermediate, and advanced all bundled together and presented in a way only STL can do.)

Thank you, STL . Were so delighted to have you back!

In part 1, STL focuses on Name Lookup , which is a surprisingly complex process. Remember Herb Sutters great GotW post (#30, to be precise) on Name Lookup? Heres the problem from that post, to refresh your memory (Thanks to Herb for providing information like this on GotW!): In the following code, which functions are called? Why? Analyze the implications?

<pre class="brush: cpp
namespace A {
struct X;
struct Y;
void f( int );
void g( X );
}

namespace B {
void f( int i ) {
f( i ); // which f()?
}
void g( A::X x ) {
g( x ); // which g()?
}
void h( A::Y y ) {
h( y ); // which h()?
}
}
[/code] We recommend you watch this entire episode before playing around with Herbs sample above (and dont read the GotW answer, either! Thats cheating. Learn from STL. Hes an outstanding teacher, as you know.)

Please supply feedback on this thread, especially as it relates to what youd like STL to focus on in subsequent episodes. For part 2, STL will focus on Template Argument Deduction .

Tune in. Enjoy. Learn. <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Feeds/RSS&WT.dl=0&WT.entryid=Entry:RSSView:49990d711e3240ab9e0aa04d012b1c60

View the full article
 
Back
Top