Timeline for Do you re-include system headers in the implementation files?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 12 at 12:33 | comment | added | Doc Brown | @user129393192: in C++, when you don't follow a few restricting rules in regards to header files and includes (they are mentioned in the paper I linked to), you can easily end up with one little change in the wrong header file causing a cascade of files which need to be recompiled and relinked. In a small program, this won't matter, but in a program with >1000 classes (each one with a header and a cpp file) this can cause build timesof several minutes, if not hours. | |
May 12 at 8:09 | comment | added | gnasher729 | And the preprocessor doesn’t take any time? | |
May 11 at 18:17 | comment | added | user129393192 | Thank you. What was the thing you mentioned in your comment about it being a system header and transitive not affecting build time once? I’m not sure what transitivity has anything to do with build times, given the inclusion is handled by the preprocessor. | |
May 11 at 8:46 | history | edited | Doc Brown | CC BY-SA 4.0 |
added 304 characters in body
|
May 11 at 8:40 | history | answered | Doc Brown | CC BY-SA 4.0 |