Skip to main content
12 events
when toggle format what by license comment
May 11 at 15:04 comment added Doc Brown @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.
May 11 at 11:01 comment added Bart van Ingen Schenau @DocBrown, your answer is good (+1), but I believe the answers on the other question also apply. There is no fundamental difference between including <unordered_map> or "Texture.hpp".
May 11 at 8:48 comment added Doc Brown @BartvanIngenSchenau: please read my answer below and tell me which answer in that other question thread explains it.
May 11 at 8:40 answer added Doc Brown timeline score: 5
May 11 at 6:57 history edited user129393192 CC BY-SA 4.0
added 180 characters in body
May 11 at 6:56 comment added user129393192 I'm not asking that question here. You don't know what mp[whatever] = some is. Only by looking into the header, would you know what it is. It could be anything that implements the [] operator. I'm asking specifically for cases where a declaration of that type doesn't occur in the implementation file, but it is used there.
May 11 at 6:44 comment added Bart van Ingen Schenau @DocBrown, that difference is inconsequential.
May 11 at 6:38 comment added Doc Brown @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.
May 11 at 6:19 comment added Bart van Ingen Schenau Does this answer your question? Is it good practice to rely on headers being included transitively?
May 11 at 5:56 review Close votes
May 20 at 3:06
May 11 at 5:25 comment added Ben Cottrell Does this answer your question? Is it good practice to rely on headers being included transitively?
May 11 at 4:08 history asked user129393192 CC BY-SA 4.0