Back to Profile: NotFredSafe


  • Stephan T. Lavavej - Core C++, 10 of n (Nov 2013 CTP)

    Printing the 101 inside test2() is kind of redundant, because if zeroth didn't return a reference, the expression ++zeroth(v) would not even compile, right?

  • An Effective C++11/14 Sampler

    Scott, I love your books and your talks and your hair and all, but I think during this talk, you went a little bit overboard with the condescending remarks. "The question was bla bla bla", really?

    Looking forward to Effective C++11/14.

  • GoingNative 15: VC++ turns 20, Ale turns 40, C9 turns 9

    Is it me, or is the aspect ratio of the main material way off (egg heads)?

  • Stephan T. Lavavej - Core C++, 4 of n

    I would still like to see that "parameter passing best practices" episode Wink But if it's gotta be core C++, how about "sequence points are dead, long live the sequenced-before relationship"?

  • Stephan T. Lavavej: Core C++, 3 of n

    static_assert(sizeof("peppermint") == 11, "6 + 4 + 1 == 11");

  • Stephan T. Lavavej: Core C++, 3 of n

    When I play this video in VLC, the title says "Dina Dublon". Why is that? Smiley

  • Stephan T. Lavavej: Core C++, 2 of n

    [1F13] Deep Space Homer

    Scientist: [resigned] Well, Homer, I guess you're the winner by default.

    Homer: Default? Woo hoo! The two sweetest words in the English language: de-fault! De-fault! De-fault!

    [assistant clubs him]

  • Stephan T. Lavavej: Core C++, 2 of n

    I don't know if this is too basic or not, but how about making an episode about best practices for parameter passing in C++11?

    Like, when do you pass by value, by lvalue reference, by lvalue reference to const, by rvalue reference, by rvalue reference to const, by pointer or by pointer to const? When should you prefer passing iterators instead? Is it a good idea to have iterators as members? Or should they just be used inside a function? How do you pass stuff into members? Should move-only types be passed by rvalue reference or or by value? Should we pass shared pointers by lvalue reference to const, by rvalue reference to const or by value?

    What do we do in generic code? How do we decide what the best passing mode for T is? (Doesn't Boost have a meta-function for this?) What's the difference between ConreteType&& and TemplateParameter&&? Related: what does auto&& mean, and when should I use it?

    I think it would be really helpful, especially for beginners, if you could dissect these issues in the next episode.

  • Stephan T. Lavavej: Core C++, 2 of n

    If template argument deduction does not allow any conversions, how come "peppermint" is converted from const char[11] to const char* before being matched with the const T* overload?

  • STL11: Magic && Secrets

    At 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

    # Now let's consider insertions for the vector in detail. What you do is simply allocating a new chunk of memory with n+1 space and traversing the original vector, copying all elements into the new chunk. All of this costs O(n)

    Allocating 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 Smiley

  • YOW 2012 Keynotes and Session Videos Now Available

    Nice! Download links would be very nice.