3 ms·
It you are looking for news on C++20 modules support, then, sadly, there is not much progress since GCC 11. I've re-tested my modules examples[1] a few days ago
by boris 4y ago
It you are looking for news on C++20 modules support, then, sadly, there is not much progress since GCC 11. I've re-tested my modules examples[1] a few days ago with the GCC 12 snapshot, and while a few bugs have been fixed, the majority remain unfixed[2].
[1] https://github.com/build2/cxx20-modules-examples https://github.com/build2/cxx20-modules-examples
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
- suby 4y agoThanks for posting this information. Module support is the one feature I am really looking forward to.
- Kelteseth 4y agoThere is an active MR [1] to add modules support to CMake 3.24 (based on this comment [2]) [1] https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7210 https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7210 [2] https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7210/diffs#5c353ab38e68944f55348abea692a55a27bc36a3_55_56 https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7210...
- WalterBright 4y agoModules were added to C with 10 lines of code: https://nwcpp.org/April-2022.html https://nwcpp.org/April-2022.html https://dlang.org/spec/importc.html#__import https://dlang.org/spec/importc.html#__import The same technique could be used with C++.
- WalterBright 4y agoThe method is based on the idea that the product of the semantic pass of a compiler is a symbol table. Then, to make imports work: 1. add some syntax to import a module 2. create another instance of the compiler to compile that module and return the symbol table 3. have the importer, when it doesn't find a symbol in the symbol table, to search the symbol tables of the imports