STL11: Magic && Secrets

Share:

Listens: 0

GoingNative 2012 Sessions (HD)

Miscellaneous


The C++ Standard Library expanded and evolved massively between C++98/03 and C++11.  It's easy to forget the magnitude of these changes, because they happened gradually and sometimes invisibly.  Some things (like shared_ptr, regex, and function) were developed in Boost in the early 2000s, before making their way into TR1 in 2005 and then C++11.  Other things, like container move semantics, automatically improve programs without human intervention.  Sometimes I can hardly believe that programmers used to live without non-intrusive deterministically reference-counted smart pointers!  We are fortunate to live in such an advanced and enlightened age.In this presentation, I'll explore how some of the C++11 Standard Library's magic works, including how the Standardization Committee fixed pair's constructors (I bet you think that pair is the simplest type in the world - ha! wrong!) and how I saved a million zillion bytes of memory across all the programs using VC10+'s make_shared().Oh, and I will also reveal a secret that has never been announced before.