C++20 Modules - Review of the Current State of C++ Modules 2024
summary
C++20 modules work but are still rough in practice: CMake 3.28 adds CMake 3.28 dependency scanning and Ninja 1.10 supports on‑the‑fly reorder so compilers can produce BMIs before imports, but packing prebuilt BMIs fails often—Clang/GCC treat BMIs as cache and MSVC is more forgiving—so consumers must usually generate BMIs on consumer side. Examples with fmt and Vulkan show visibility, compiler‑flag and path issues and that bundled BMI incompatible across compilers is the common pitfall.
AI-written summary · about
chapters (14)
- 0:00C++20 modules overview
- 4:45Build times and isolation
- 7:32Compiler flags and resolution
- 10:48Build order and dependencies
- 15:32Dependency scanning changes
- 21:31Packaging with CMake
- 25:01BMI bundling issues
- 34:14MSVC BMI reuse limits
- 37:48Module-only libraries
- 43:11Header-only to modules
- 48:51Module packaging best practices
- 53:33Flag consistency and BMI
- 55:00Common errors and limits
- 58:10Current state and future
related talks
36mC++ Modules: Year 2021
01h 04mProgramming with C++ Modules: Guide for the Working
58mWhy Modules?: It's not about build time
32mVisibility, Reachability, Linkage – The Three Secret Spices of C++ Modules
01h 30mC++ Modules and Large-Scale Development
01h 30mC++ Modules and Large-Scale Development
59mC++ Modules and Large-Scale Development
01h 01mLarge Scale C++ with Modules: What You Should Know
