Exception-Safe Code

A one-day class.

The original version of this course was voted Best Tutorial at C++Now 2012.

A good first class.

Download the PDF.

Exception-Safe Code is a thorough examination of exceptions in C++.

We cover exception syntax and semantics, addressing what problem exceptions are used to solve, other approaches to solving the same problem, and we present a set of exception-safety guidelines that, when followed, will result in code that is easier to read (easier to understand and maintain), easier to write, with no time penalty, which is 100% robust in the face of thrown exceptions.

Templates and Generic Programming

A two-day class.

Based on material by Dave Abrahams, Jon Kalb, and Scott Meyers.

A good first class.

Download the PDF.

Templates and Generic Programming is an introduction to C++ templates, Generic Programming, and the STL (Standard Template Library).

The class focuses on the fundamental concepts of what Alex Stepanov, the creator of the STL, achieved with Generic Programming rather than specific language details, but we do cover important template syntax.

We cover template concepts for function and type templates including argument deduction, two-phase compilation,

dependent types, non-type template parameters, and full and partial specialization.

We cover several modern template techniques such as, CRTP, type traits, compile-time conditional code, policy classes, perfect forwarding, and how to view deduced types.

The class introduces Generic Program’s goals and methods, both as a valuable programming paradigm in its own right, but also as a key to understanding the STL and how best to use it.

The class ends with a survey of the algorithms in the standard library, with a deep dive on sorting-related algorithms.

Overview of the New C++ (C++11/14/17)

A three-day class.

Based on material by Scott Meyers.

A good first class.

Download the PDF.

Overview of the New C++ (C++11/14/17) covers language and library features which the standard introduced starting with C++11. And such features! auto declared variables reduce typing drudgery and syntactic noise; Unicode, threading support, and alignment control address important functionality gaps; and rvalue references and variadic templates facilitate the creation of more efficient, more flexible libraries. The standard library gains resource managing smart pointers, new containers, additional algorithms, support for regular expressions, and more. Altogether, C++11 offers much more than “old” C++. This intensively technical seminar introduces the most important new features in C++11 and explains how to get the most out of them.

This course also covers C++14 features. These include deduced function return types; reader/writer locks; and extensions to lambda expressions (auto and variadic parameters, generalized captures).

Scott Meyers originally created this course to cover C++11 and then updated it to cover C++14. Jon has updated and refined the course to cover C++17 (and, where directly relevant, C++20).

Effective Modern C++

A four-day class.

Based on material by Scott Meyers.

Recommend Overview of the New C++ first.

Download the PDF.

Truly understanding Modern C++ requires more than just familiarizing yourself with auto type declarations, move semantics, lambda expressions, concurrency support, etc. You also need to learn how to use those features effectively so that your software is correct, efficient, maintainable, and portable. That’s where this seminar comes in. It describes how to write truly great software using C++11 and later C++ versions—i.e. using modern C++.

Scott Meyers originally created this course based on his book Effective Modern C++. Jon has updated the material for C++17 and C++20 where directly relevant).