> It's a known problem so we mitigate with #ifdef guards, #pragma one etc. but in my experience those band-aids don't solve the problem.
Errr, why?
Errr, why?
That said, I don't think that is that big of a problem compared to final compile time reduction.
EDIT: Disregard that, the preprocessor remembers the states of include guards. So there is literally no point.[1]
[1] https://gcc.gnu.org/onlinedocs/cpp/Once-Only-Headers.html
Plus:
> I don't think I've ever seen any C++ code bases that follows this rule.
It's not particularly useful to do this given that the moment you include anything from /usr/include and STL that rule will get broken from under you a 100 times.