3 ms·
you 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 translat
by feelamee 1y ago
you 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.