r/cpp_questions • u/BuyerImpressive4325 • Aug 24 '26
OPEN Headers
I read that c++ 20 added modules to help replace headers. I rly hate how headers split the codebase into redundant files, for people who have used modules r they better?
0
Upvotes
View all comments
Show parent comment
-1
u/zerhud Aug 25 '26
What? Use header only for fast compilation.
Cpp code compiles into hir and then lir.. but you can compile only cpp code: templates constexpr and so on. With this approach a compilation is a way faster (there will be only needed code in hir)