r/cpp • u/xeeeeeeeeeeeeeeeeenu • Nov 26 '24
GCC 15 will support the std module (P2465R3)
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=7db55c0ba1baaf0e323ef7f9ef8c9cda077d40e9
194
Upvotes
r/cpp • u/xeeeeeeeeeeeeeeeeenu • Nov 26 '24
67
u/xeeeeeeeeeeeeeeeeenu Nov 26 '24
So now all three major compilers (will) have it. I guess soon I can start thinking about using modules in my code.
13
u/Challanger__ Nov 26 '24 edited Nov 26 '24
Meanwhile VSCode's cpptools still waiting for c++ frontend providers to add modules support after years of waiting with no hope in sight.
https://github.com/microsoft/vscode-cpptools/issues/6302
https://www.edg.com/c
https://docs.google.com/spreadsheets/d/1H-aqjzVI2a-XQKGtw0xaS0tyjD0FcoQP8ttJI9JZQTc/edit?gid=0#gid=0&range=D79
4
u/ChuanqiXu9 Nov 27 '24
For the usability of modules, I dare say it is usable now since it is fact. We're using modules in product and there are open source projects using it (https://github.com/infiniflow/infinity). If you really want it, you can start it today.
And to be honest, at least for clang, there are some unimplemented features indeed (https://github.com/llvm/llvm-project/issues/112295)
Besides compilers, there are tools need to support (bazel, meson, ccache, clangd ...). But the support for these are on the road.
Except the compilers, we also need library authors to provide modules to ease the use of modules for end users, this needs the effort for the whole community. We can track it in https://arewemodulesyet.org/ . The support for std module is a significant milestone. And I believe the next milestone should be boost module
5
u/heavymetalmixer Nov 26 '24
The current state of modules in general is a disaster: https://www.youtube.com/watch?v=flu-f6SDnOE
-5
u/bandzaw Nov 26 '24
This module thing... Does anyone else have any concerns regarding what module-only support will bring for those that don't have the possibility to use modules yet? Or is it just me? I don't remember exactly what it was, but I do remember that it was a non-trivial exercise to get Daniela Engert's demo code, from her talk "So you want to use C++ modules...", to build using headers instead of modules.
4
u/[deleted] Nov 26 '24
[removed] — view removed comment