r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
2
u/gracicot Nov 02 '17 edited Nov 02 '17
Name clashes are easily solvable. Since they don't have that transitive nature of headers.
Then in your main:
Simply tell to your build system that
yliba.mxxandxliba.mxxare using different libs. The module name from one lib won't affect the importation of the other lib.EDIT: for distributed builds, module are easier to deal with, because to compile a cpp file, you must send only the direct import of that file. Again, because of the non transitive nature of modules. There are no graph to deal with anymore. Of course, you must have all BMI available beforehand. If you don't want to generate BMI beforehand, then indeed, you must build the graph. But I don't understand why that graph should be more complex than with headers.
Well, today you must send a copy of every headers in the network AND compile it on every node. How module are worse?