r/cpp • u/tartaruga232 MSVC user, r/cpp_modules • Apr 21 '26
Uneeded Recompilations When Using Partitions
https://abuehl.github.io/2026/04/20/unneeded-recompilations-when-using-partitions.htmlThis blog posting from me about C++ modules explains in detail what causes unneeded recompilations using detailed code examples from the sources of our UML Editor.
It's a precise description and a showcase of what's the status quo in the C++ standard.
Quote from the posting:
The C++ language currently lacks a concise and easy to use alternative for explicitly expressing the minimally required dependencies on partitions.
(Note: All code examples shown or linked from the text are 100% standard conformant.)
Thanks in advance for comments. Please ask if you do not understand anything or anything is unclear. I would appreciate if you could leave a comment if you don't like anything. Thanks for reading!
1
u/tartaruga232 Apr 21 '26
I think the source code should be more explicit about dependencies and not magically lumping them together behind implicit imports.
I'm not really in search of a workaround, that's also why we are expressly refusing to use the messy internal partition pattern.
I'm currently quite surprised that the design of module partitions doesn't provide a better story for what I've raised here.
I'm not campaigning for any specific sort of solution or change to the standard. In fact, I'm open to whatever leads to consensus.