Modules are coming
summary
Claim: C++20 modules redefine the compilation model, replacing textual inclusion with precompiled module interfaces (BMIs) that cut redundant parsing, enforce encapsulation, forbid cycles and make imports order‑independent. Practical details: header units for migration, module global and private fragments, partitions, and the risk that include translation can break macro‑based configuration. Migration is nontrivial—expect a one‑decade transition—and ecosystem work (dependency metadata, module recipes) lands via a tooling TR in about one to two years.
AI-written summary · about
chapters (34)
- 0:00Start
- 2:11Modules Example
- 4:38Lambdas
- 6:36Compilation Model
- 7:27Non Modular Unit
- 8:13Compilation of the Textual Inclusion Compilation Model
- 10:03Problems with the Textual Inclusion Model
- 11:26Odr Violations
- 12:06Runtime Error
- 12:59Lack of Encapsulation
- 15:25Compilation Error
- 16:13Example of Modular of the Modular Compilation Model
- 22:07Translation Units
- 23:09Import
- 23:46What Is an in Portable Header
- 26:38Include Translation
- 27:27Header Unit
- 28:26Writing Modules
- 30:01Structure of Module Units
- 31:42Export Keyword
- 34:27Implicit Export
- 36:25Modules Provide Stronger and Capsulation than Textual Inclusion
- 38:15Name Encapsulation
- 39:29Detail Namespaces
- 46:32Imports of Legacy Headers
- 50:11Deal with Non Modular Headers
- 50:52Module Global Fragment
- 52:33Module Ownership
- 52:49Modules Are Order Independent
- 53:56Problem of Ownership
- 56:05Modules Owning Their Declarations
- 58:38Private Module Fragment
- 59:10Module Partitions
- 1:04:09C + + Modules Tool Tooling Interactions Technical Report
related talks
01h 08mC++20 Modules, 5 Years Later
01h 08mA Short Tour of C++ Modules - Modules Demystified and Applied
01h 07mC++20 Modules: The Packaging and Binary Redistribution Story
01h 06mImplementing C++ Modules: Lessons Learned, Lessons Abandoned
23mRust's Module System For Effective Software Architecture
01h 38mC++20: Reaching for the Aims of C++
02h 02mPeering forward: C++'s next decade
55mimport CMake, CMake and C++20 Modules
