r/cpp • u/holyblackcat • Mar 09 '26
The compilation procedure for C++20 modules
https://holyblackcat.github.io/blog/2026/03/09/compiling-modules.html
101
Upvotes
r/cpp • u/holyblackcat • Mar 09 '26
View all comments
Show parent comment
1
u/mwasplund soup Mar 10 '26
Do you have a concrete example of this scenario in practice? I have heard this argument a few times and it sounds more like a code smell for a design issue instead of a limitation we need to fix in the language. In the rare case that we have a circular dependency that is required then these two classes are already tightly linked conceptually. It seems reasonable to link them physically in a single translation unit. I agree this is not ideal (I prefer one file, one class), but it is not language breaking.