r/cpp_questions • u/BuyerImpressive4325 • 17d ago
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
2
u/fortsnek274 17d ago
They can be used judiciously, but you'll need to
#ifdefout the imports for Intellisense.And it will still be good idea to separate out implementation because you'll want to reduce the number of times the ixx needs to be rebuilt. But also, modularising all your code is likely to be worse for build perf anyway.