3 ms·
Thing is (correct.me if Im wrong), that if you use modules, all of your code need to use modules (e.g. you cant have mixed #include <vector> and import <vector>
by zbendefy 1y ago
Thing is (correct.me if Im wrong), that if you use modules, all of your code need to use modules (e.g. you cant have mixed #include <vector> and import <vector>; in your project). Which rules out a lot of 3rd party code you might want to depend on.
- feelamee 1y agoyou wrong You can simply use modules with includes. If you will #include vector inside your purview then you will just get a copy of the vector in each translation unit. Not good, but works. On the other hand. If you include a vector inside the global module fragment, then the number of definitions will be actually 1, even if you include it twice in different modules.
- will4274 1y agoWell, the standard says you can, but it doesn't actually work in practice in msvc, which is the only compiler that's supported modules for over a year.
- feelamee 1y agogcc and clang implemented them too, but partialy. My comment about this absolutely wrong point: > all of your code need to use modules With all three major compilers you can right now use modules and at the same time include some other dependencies.