Tech Talks: C++ in the 21st Century

arvid —  March 26, 2014 — 1 Comment

BitTorrent Tech Talks are one-hour sessions dedicated to the stuff that keeps us busy / keeps us up at night / keeps us coding. From time to time, we post them here. Because sharing.

In this edition of Tech Talks: an overview of some C++ gems. I threw this talk together because my team was about to start a new project in C++11. Since it’s fairly new, I figured some of it might not be as well-known as it should. Fundamentally, I’m pretty excited about all the new possibilities in C++11. Even higher-level abstractions, at even lower cost than C++98.

In the video below, we go over for-loops, automatic type deduction, lambda functions and more.

Correction: I say that lambdas with an empty capture statement defaults to by-value, which is incorrect. It defaults to not capturing anything.

Follow along with the C++ in the 21st Century slides:


 

Looking for more on BitTorrent engineering? We’ve got Tech Talks aplenty. Check out Distributed Hash Tables, DHT Bootstrap Update, and Writing High Performance Software.

arvid

Posts

Arvid Norberg is the Chief Architect at BitTorrent, Inc., a veteran of the µTorrent team, one of the key members of the BitTorrent Chat development team, and expert in peer-to-peer technology.
  • Thief

    On slide 18 you say auto is conceptually decltype(), this isn’t true. Auto uses template type deduction rules, where decltype() uses its own (different) rules. This difference is most noticeable if the expression is of reference type, as auto will always remove the reference from the type and take a copy (unless you write auto&), where decltype will be a reference if the expression is a reference and value if the expression is a value.