r/cpp • • Mar 09 '26

The compilation procedure for C++20 modules

https://holyblackcat.github.io/blog/2026/03/09/compiling-modules.html
103 Upvotes

47 comments sorted by

View all comments

Show parent comment

1

u/holyblackcat Mar 10 '26

FYI, I think you are missing an export in the a.cppm sample under "Kinds of module units" section 4.

Thanks, fixed!

For now I have to flatten the entire dependency tree

FYI while it's needed on MSVC, it's suboptimal on Clang, which promises to handle this for you (and will only change the hash of a BMI if the dependencies that were modified can affect the consumer of that BMI).