Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 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. Commented May 11 at 18:17
  • And the preprocessor doesn’t take any time?
    – gnasher729
    Commented May 12 at 8:09
  • @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.
    – Doc Brown
    Commented May 12 at 12:33