CppCon 2019 has ended
Tuesday, September 17 • 09:00 - 10:00
Practical C++ Modules

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Modules are merged into the C++20 draft which means we now have a good idea what to expect, functionality-wise. Tooling support is also not far behind with compiler and build system vendors making steady progress. So we've got modules, but what now? How do we start using modules in our projects?

The aim of this talk is to answer the "What (& Why)", "How", and "When" of C++ Modules: what are modules (& why do we need them), how to apply them to new and existing codebases, as well as when can we start the migration.

We begin with a brief introduction to modules (structure, partitions, header units, include translation) and their relation to other physical design mechanisms (namespaces, headers, libraries, packages). We will also get a basic understanding of the underlying build mechanics which turns out to be necessary to use modules effectively.

Next we dive into the practical aspects of using modules: should we start with header units or go straight to proper modules? If header units, then should we use explicit import or rely on include translation? And if proper modules, then what is the appropriate module granularity? How to name our modules? Split or not to split (into module interface/implementation units)? And what about module distribution?

We conclude the talk by discussing the state of compilers, build systems, and (system) headers with regard to modules and whether now is a good time to start a new or modularize an existing project.

avatar for Boris Kolpackov

Boris Kolpackov

Chief Hacking Officer, Code Synthesis
Boris Kolpackov is a founder and CHO (Chief Hacking Officer) at Code Synthesis, a company focusing on the development of open-source tools and libraries for C++. For the past 10 years Boris has been working on solving interesting problems in the context of C++ using domain-specific... Read More →

Tuesday September 17, 2019 09:00 - 10:00 MDT
Aurora D
  • Modules/Builds/Packaging