Leading Edge C++

Slide header

Masterclass on Leading Edge C++, a roundup of C++20 and C++23.

Abstract

In C++ land, it’s Christmas every three years, when the committee comes up with a new version of the language. Each present contains a new language- or library-related feature, and the presents are plentiful. This all sounds quite merry and optimistic, but in reality, in the industry, we are often forced to stick with the presents of yesteryear. Hardware-related tool chains, standardization processes, or company policy dictate what we can or cannot use – often preventing us from using the very latest C++ version in production. However, that’s not to say we shouldn’t keep up-to-date! In fact, it can be hugely beneficial to be prepared for what’s coming in the next versions as it enhances our ability to plan ahead and adapt when the time comes to update. Join me in this session where we will look into the many great features C++20 offers, like concepts and the ranges library. With slightly less attention to detail, we will delve into C++23 which is soon to be finalized. So let’s be prepared and redefine what “modern C++” really is: an ever-evolving ecosystem of a great programming language.

Audience

Professionals in software engineering, level beginner to advanced, interested in learning about C++.

Topic listing

These are the main topics addressed in the talk:

  1. Leading Edge C++
  • How C++ is cooked up
  • C++20 – not just any update
  • Compiler support for C++20/23
  1. C++20: Modules
  • The problem modules solve
  • The simplest ever module
  1. C++20: Concurrency
  • The joining thread jthread
  • New synchronization primitives
  1. C++20: Compile-time validation with concepts
  • What concepts are about
  • Imposing type constraints
  • Constraining (member-)functions
  • Defining custom concepts
  • requires expressions
  1. C++20: Coroutines
  • What are coroutines?
  • Associated type promise_type
  1. C++20: Improving algorithms using ranges
  • Ranges
  • Range pipelines and views
  • Ranges, views and projections
  • The Range-v3 library
  1. C++20: More notable stuff
  • Array view type std::span
  • String formatter std::format
  • Default comparisons and operator<=>
  1. An outlook to C++23
  • C++23 in one slide
  • Multidimensional array view mdspan
  • Result type std::expected
  • Coroutine generator std::generator
  • Range extensions