Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
STL11: Magic && Secrets
Feb 05, 2012 at 4:51 AMAt 35:12, you start talking about move semantics in the context of the flip function taking a string by value, but there are no move semantics involved here. Since the arguments are const char arrays, the string variable s is simply initialized by the constructor string(const char*), as it always has been.
Interactive Panel: The Importance of Being Native
Feb 04, 2012 at 4:18 AMAllocating n+1 space is a common beginner's mistake which would indeed lead to O(n) push_back performance. In reality, the complexity of push_back is "amortized constant time", because the space is not increased by a fixed addend like +1 or +10 but rather by a fixed factor like *1.5 or *2.
I'm a bit surprised STL did not comment on this since. Unless I'm mistaken, this issue is one of his pet peeves
YOW 2012 Keynotes and Session Videos Now Available
Jan 31, 2012 at 3:01 AMNice! Download links would be very nice.
Talkin' C++ with Kate Gregory
Mar 11, 2011 at 1:10 AMHow about an E2E on C++0x with Kate and Stephan?
C9 Lectures: Stephan T Lavavej - Advanced STL, 2 of n
Mar 04, 2011 at 2:27 AMDiscussing terminology is often futile. For example, most C++ programmers say that "a pointer is a variable that stores an address", which is completely wrong. Should I go around correcting these people all the time? No. It is common vocabulary that you simply cannot eradicate anymore. As long as everybody understands what you're talking about, there's no problem. We all know that, at least in the context of these videos, STL means "the part of the standard library that is based upon the ideas of containers, algorithms and iterators".
(In case you're wondering, despite its name, the unary prefix operator & does not yield an address, but a pointer. The correct way to say it would be "a pointer variable is a variable that stores a pointer", which is quite obvious, so you won't hear it uttered very often.)
C9 Lectures: Stephan T Lavavej - Advanced STL, 2 of n
Mar 03, 2011 at 12:15 PM@44:22 Casting to void* would be unwise, because you cannot do pointer arithmetic on void pointers
C9 Lectures: Stephan T Lavavej - Advanced STL, 1 of n
Feb 12, 2011 at 1:52 AMYes, I know. That's why I said "used to wonder" and later mentioned placement new.
C9 Lectures: Stephan T Lavavej - Advanced STL, 1 of n
Feb 11, 2011 at 3:54 PMHere is something I used to wonder for a long time. It is impossible to create an array of a user-define type that has no default constructor (unless you explicitly initialize all elements via the array-initalizer, of course). How does std::vector pull it off even though it uses an array internally? So if it's not too trivial, you could talk about placement new and explicit destructor calls. (This would be a perfect place to discuss various memory management and object lifetime details/issues.)
Also, I would love to see a guide through the implementation of unordered_set, provided there is any interesting "magic" going on.
I guess <initializer_list> is not practical to talk about yet due to lack of support in VC, right?
C9 Lectures: Stephan T. Lavavej - Standard Template Library (STL), 10 of 10
Jan 25, 2011 at 12:56 PMI miss your "horrible scribblings"
When will the new series start? Can't wait!
C9 Lectures: Stephan T. Lavavej - Standard Template Library (STL), 10 of 10
Jan 10, 2011 at 2:28 AMStephan, any news on the upcoming advanced STL series? Really looking forward to watching it
See more comments…