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.

8
  • 3
    Does this answer your question? Is it good practice to rely on headers being included transitively? Commented May 11 at 5:25
  • 1
    Does this answer your question? Is it good practice to rely on headers being included transitively? Commented May 11 at 6:19
  • @BartvanIngenSchenau: did you notice that the other question (and its answers) does not say anything about sys-lib headers? All examples shown there are about project-immanent headers. I was considering to vote as a dupe, too, but I hesitated exactky because of this difference.
    – Doc Brown
    Commented May 11 at 6:38
  • @DocBrown, that difference is inconsequential. Commented May 11 at 6:44
  • 1
    @BartvanIngenSchenau: there is a difference - headers from standard libs don't change (or at least very rarely), so the negative effect of transitive includes to build times will less matter than in the case of project-immanent headers. This might be irrelevant for this case, but I think it is not necessarily obvious for the asker that this is the case. That other question is related, of course, but Ben Cotrell's comment seems to be enough for my taste - I would not have close-voted this as a dupe.
    – Doc Brown
    Commented May 11 at 15:04