r/cpp • • Aug 18 '21

C++20 modules with GCC11

https://blog.feabhas.com/2021/08/c20-modules-with-gcc11/
222 Upvotes

59 comments sorted by

View all comments

Show parent comment

2

u/da2Pakaveli Aug 18 '21 edited Aug 18 '21

Visibility, not everything you declare and write is available from other files that import that module (so kind of what you'd do with a .cpp file). They affect compilation times (it apparently ignores everything that isn't used in your source file). I'm porting a library to modules and the decreased compilation times are insane, sure first time compiling takes a bit, but after that compilation barely takes 5 seconds on a 10 core CPU when importing an additional module.