The Standard Library from Scratch [2019 Class Archive]

“The Standard Library from Scratch” is a two-day training course with programming exercises taught by Arthur O’Dwyer. It is offered at the Gaylord Rockies from 9AM to 5PM on Saturday and Sunday, September 14th and 15th, 2019 (immediately prior to the conference). Lunch is included.

Course Description

Join Arthur O’Dwyer on a deep dive into the innards of the standard library. We’ll implement a significant fraction of the standard library in two days, by building high-level components on top of lower-level ones. As we go, we’ll touch on just about every aspect of modern C++ programming, including value semantics, exception safety, the C++11 multi-threaded memory model, and several “standard” API design patterns.

This course is ideal for anyone who worries about the potentially hidden performance costs of “modern C++”, anyone who needs to implement a bulletproof C++ API in the style of the standard library, or for anyone who enjoys digging deep into the internals of complex systems.


Students are expected to have a good working knowledge of C++11. A working knowledge of classes, virtual functions, templates, exception-handling, C++11 lambdas, and move semantics will be assumed. Knowledge of C++14 or template metaprogramming is not required. The class will include short exercises presented via the online compiler at Please bring a computer with a Web browser and/or a C++14 compiler installed.

Course Topics

  • C++17 lambdas from the ground up; as contrasted with std::function
  • std::atomic, std::mutex, std::condition_variable, and std::call_once
  • Classical polymorphism and virtual functions
  • Type erasure: std::function and std::any
  • Small object optimization in std::string and std::function
  • Promises and futures from scratch
  • Specializing behavior via SFINAE and tag dispatch: vector<bool> and future<T&>
  • Complex metaprogramming: std::tuple and tuple_cat, std::variant and visit
  • Conditionally trivial special members
  • The iterator hierarchy: implementing container iterators and iterator adaptors
  • Allocators and what it means to be “allocator-aware”
  • Comparators, std::less, and std::hash
  • Why certain functions are noexcept and others aren’t

Course Instructor


Arthur O’Dwyer is a speaker and blogger on modern C++ topics. He has spoken at every CppCon since its inception in 2014, and is also a regular presenter at C++Now. Arthur is the author of Mastering the C++17 STL (Packt Publishing, 2017).
In 2019, after a dozen years as an engineer, Arthur is finally making the leap to become a full-time trainer and instructor in modern C++.