r/cpp_questions • u/Tiwann_ • 9d ago
OPEN What’s the state of modules
I’ve been hearing about modules since a while now and I can’t seem to find any serious project on the internet using modules. I assume compilers still don’t fully support modules…
6
Upvotes
2
u/azswcowboy 8d ago
This would be a semi fair description. The big three (msvc, clang,gcc) support named modules and import std. Only msvc supports header modules. It’s been a rough road to get here due to tool chain support and compiler bugs - largely exhibiting as ICEs. At the current juncture the biggest hold up now in my view is mixed mode modules and header includes causing ICEs. Until that’s resolved incremental adoption is problematic. Technically it can be worked around with ordering of imports and includes but that can be really difficult in a large codebase.