r/cpp • u/TheRavagerSw • Mar 30 '26
Header units importing other header units should be removed from the standard
Header units are meant to speed up module migration, the idea is you write a named module, export import a header unit and just use the named module.
Header units importing other header units serve no purpose other than damaging tooling.
It should be removed from the standard so people can actually implement the tooling in a sane way.
0
Upvotes
7
u/rileyrgham Mar 30 '26
You're new to this, aren't you?
2
u/bert8128 Mar 30 '26
Can you give a concrete example (either in the standard, or in an implementation of the standard)?
2
u/tartaruga232 MSVC user, r/cpp_modules Mar 30 '26
I've spent quite some time with modules so far and we use them now. I once thought using header units might be a good idea. They probably are, but looking back I never really used them.
Not strictly related to this posting and I'm not sure yet it's a good idea, but I today created the new subreddit r/cpp_modules. Perhaps we can offload some of the modules postings/discussions there. Just in case anyone is interested...