Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 7
    Are there some binding principles to these rules of thumb? It seems like a nice list of suggestions, but... As an outsider arriving to this question via Google, how does your answer help me pick up C++11 in a principled way, and use it without wrapping myself around the C++ axle? Commented Oct 22, 2012 at 22:54
  • 3
    +1 for the list, but I have a small nitpick: when (rightly) warning against std::for_each I would have expected the range based for loop as a better replacement than plain for. Commented Oct 23, 2012 at 7:30
  • @FabioFracassi: Oops. I wrote plain to contrast with std::for_each, not with range-based. I’ve removed it to avoid confusion. Commented Oct 23, 2012 at 17:47
  • 1
    I would update if it wasn't for std::for_each(). When you have lambda, it's certainly better than a traditional for loop. With a range-based for loop that might not be the case, but you didn't write "range-based for loop". Commented Oct 28, 2012 at 20:32
  • @sbi: In my mind, the term “for loop” includes “range-based for loop”. I have edited with more explanation and an example to clarify, thank you. Commented Oct 29, 2012 at 14:17