Workshop: C++17 Features

C++

Learn about the most important additions in C++17! Both the core language and the library have been extended with new features that significantly reduce the likelihood of bugs, improve readability and maintainability of code, and enable new powerful programming paradigms.

Through lectures and exercises, you will learn about the immense value C++17 brings to the table and you’ll be able to start taking advantage of it in your projects immediately. At the end of the workshop, you will learn about:

  • How to immediately make your code safer and less prone to bugs.
  • Avoiding security issues and undefined behavior with `[[nodiscard]]`.
  • Avoiding performance and security issues with `[[fallthrough]]`.
  • Preventing invalid states from being represented thanks to `std::variant` and `std::optional`.
  • How to reduce boilerplate or verbose patterns which are present in most codebases.
  • New code generation features such as “fold expressions”.
  • How C++17 completely eliminates copies and moves of your objects in many cases.
  • How to make your code more pythonic and functional, thanks to “structured bindings”.
  • How to completely eliminate arcane SFINAE techniques thanks to `constexpr if`.
  • Fixes to surprising behaviors in the language, such as `auto` curly brace deduction.

And you will be able to:

  • Immediately and gradually apply C++17 features in an existing codebase to improve safety and maintainability.
  • Design new components with new powerful patterns that help model real-world scenarios minimizing complexity.
  • Improve compilation times and readability by replacing template metaprogramming with simpler and more powerful constructs.

Prerequisites:

  • Comfort with C++11, such as familiarity with move semantics, smart pointers, and lambda expressions
  • Basic knowledge of C++14