Skip to content
Module 8

Modern C++ & Best Practices

The latest C++ standards (C++17/20/23/26), build systems, testing practices, and professional coding guidelines, with only a modest amount of tutting.

C++17 & C++20 Features

  1. C++17: The Practical Standard

    Explore C++17's most impactful features: structured bindings, std::optional/variant/any, std::string_view, std::filesystem, if constexpr, and new attributes.

  2. C++20: The Big Four & More

    Discover C++20's transformative features: concepts, ranges, the spaceship operator, std::format, designated initialisers, std::span, and more.

  3. C++20 Coroutines

    Understand coroutines as suspendable functions. Learn co_yield, co_return, co_await, the generator pattern, and practical use cases like async I/O and state machines.

  4. C++20 Modules

    Learn why modules replace headers, how to declare and export modules, module partitions, and the transition path from header-based code.

C++23 & Beyond

  1. C++23 & C++26 Preview

    Explore C++23's std::expected, std::print, deducing this, ranges improvements, and preview upcoming C++26 features like contracts, reflection, and pattern matching.

Professional C++ Practices

  1. Build Systems: CMake & Package Management

    Master CMake fundamentals, modern target-based CMake, FetchContent for dependencies, vcpkg and Conan package managers, and compiler flags for safe, optimised builds.

  2. Testing, Benchmarking & Sanitisers

    Write unit tests with GoogleTest, benchmark with Google Benchmark, catch bugs with sanitisers (ASan, UBSan, TSan), and integrate static analysis into your CI/CD pipeline.

  3. C++ Core Guidelines & Professional Patterns

    Learn the C++ Core Guidelines, naming conventions, const correctness, API design principles, documentation practices, performance profiling, and production debugging techniques.