C++ – Updating Knowledge from Older Versions to C++20/23/26 (CPPU)

Programming, C, C++

Modern C++ represents a major leap forward in the ability to write efficient, elegant, and readable code. In this course, we will begin by introducing useful small improvements and gradually move on to more fundamental changes. We will cover everything from changing the way we approach data structures, through innovations in parallel and asynchronous programming, working with templates and concepts, and compile-time computation, to modularity and optimizing embedded software, especially for latency-sensitive environments.

The course includes a range of exercises focused on refactoring legacy code into a modern form and comparing the benefits of different approaches. It is primarily intended for experienced developers who want to make their code more efficient and easier to understand, learn modern idioms, and move from classic C++ to a modern coding style.

THIS TRAINING COURSE WILL HELP YOU:

  • Learn new C++20/23 idioms and prepare for C++26
  • Make code more efficient and simpler using ranges, views, and std::span
  • Improve code safety and robustness with concepts, std::expected, and constexpr
  • Optimize performance and latency for embedded and performance-sensitive applications
  • Design and test asynchronous and concurrent solutions using coroutines, jthread, and futures
  • Refactor legacy code into modern templates, modularity, and allocation-free polymorphism

WHO SHOULD ATTEND?

  • Experienced C++ developers
  • Embedded systems developers
  • Performance and systems engineers
  • Backend and network developers
  • Software architects and technical leads

COURSE LOCATION AND AVAILABLE DATES

Contact us

Public courses are usually delivered in Czech, but this course is also available in English. We can arrange private training for your team online, at your premises or in our classrooms, and tailor the content to your needs.

For groups of around 4 or more participants, private training can already be comparable in price to booking individual places on a public course. Send us your requirements and we’ll recommend the best format and provide an exact quote.

Request training in English

Course content:

Hide details
  • What the New Versions of C++ Bring
    1. Tools for greater readability and reliability
    2. Improving performance and latency in the embedded world
    3. C++20 and C++23 tools, expectations for C++26
  • Various Small Improvements
    1. Formatted output and std::println
    2. Changes in the initialization of values and variables
    3. The spaceship operator and strong or weak ordering
  • Interesting Specialized Tools
    1. Multiple values during indexing
    2. Calculations with std::lerp
    3. Endianness and byteswap
  • Working with Directory Structures
    1. Traversing directory structures
    2. Modifying files and directories
    3. Interaction with the rest of the standard library
  • Working with Parts of Arrays and Strings
    1. Contiguous sequences and std::span
    2. Passing strings and std::string_view
    3. Advantages and risks of views into memory
  • Improved Container Handling
    1. Removing elements with std::erase
    2. Decomposing with structured bindings
    3. Moving away from direct iterator use
  • How Ranges and Views Work
    1. The relationship between ranges, views, and containers
    2. What is wrong with iterators in C++
    3. What to watch out for with ranges
  • Tools for Filtering and Transformation
    1. Views as lazy iterators
    2. Chaining operations on views
    3. Which views are available
  • Modern Thread Handling
    1. Futures and promises
    2. Working with std::jthread
    3. Using std::async
  • Asynchronous Calls Using Callbacks
    1. Passing callbacks to events
    2. Composing callback sequences
    3. The coroutine-based approach
  • Coroutines and Asynchronous I/O
    1. Motivation for using coroutines
    2. External libraries with a scheduler
    3. Potential impacts in the embedded world
  • Asynchronous Network Communication
    1. Communication using TCP/IP
    2. HTTP server and client
    3. Concurrency with other operations
  • Compute Threads and Coroutines
    1. Coroutines are intended to handle I/O
    2. CPU-bound versus I/O-bound
    3. Combining threads and coroutines
  • Templates and Their Specialization
    1. Special handling of specific cases
    2. Specialization using tagging and policies
    3. Metafunctions and compile-time computations
  • Constraining Type Parameters
    1. Documenting type requirements
    2. SFINAE and programming with type traits
    3. Explicit constraints and concepts
  • More Convenient Work with Templates
    1. Abbreviated function templates
    2. Deducing this and perfect forwarding
    3. CTAD and omitting type parameters
  • Combining OOP and Templates
    1. Using inheritance without virtual methods
    2. Adding functionality with CRTP
    3. Type erasure and std::any
  • Libraries in Header Files
    1. The modern meaning of the inline keyword
    2. ODR and how it all works
    3. Combining it with templates and classes
  • Metaprogramming Beyond Templates
    1. The constexpr, consteval, and constinit keywords
    2. The if constexpr and if consteval conditions
    3. Using static_assert()
  • Combining constexpr and Templates
    1. Branching by type at compile time
    2. Significantly simplifying some templates
    3. constexpr function and variable templates
  • Modularity
    1. Header files and #pragma once
    2. Custom modules and modifying the ODR
    3. The standard library in module form
  • Lambdas and Their Improvements
    1. Implicit and explicit templates
    2. Lambdas with constexpr and consteval
    3. Implicit behavior of a stateless lambda
  • Error Handling Without Exceptions
    1. The std::expected return value
    2. Working with std::optional
    3. Chaining monadic operations
  • Heap-Free Runtime Polymorphism
    1. The polymorphic type std::variant
    2. Applying overloads with std::visit
    3. From lambda templates to the overloaded pattern
Prerequisites:
Knowledge of the C++ language.
Recommended previous course:
C++ – Practical Programming for Advanced Developers (CPP2)
Recommended follow-up course:
C++ – Design Patterns and Idioms (CPP3)
Schedule:
5 days (9:00-17:00)

Training and learning environment