3 ms·
Modules in C++
- signa11 15y agojust to clarify a couple of points: 1. this is a *proposal* by david-vandervoorde, and has not been ratified by the ISO committee yet. however from "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2869.html, it is evident that this feature is too damned important to wait for another revision of the standard. 2. the *fundamental* idea here is to do away with header files altogether. and have the compiler automagically generate a "module" file that describes the public interfaces of a library. the said module, can then be *imported* into a ".cpp" file. yes, "import" is now a core language construct instead of a pre-processor construct. 3. the compiler is expected to read elements of module file that are needed by client code. for more details e.g. format of module files, dependency calculation (make and friends), module-abi etc. the referenced proposal is the best bet.