Victor Vianna and myself have been having a discussion about when it’s most appropriate to include headers for a type.
The discussion is mostly centred around whether it is required to include the header for a type that you pass or receive by value. For reference this came up in
https://crrev.com/c/7767457.
The conclusion is that you should include the headers for all types passed by reference to a function.
Currently this is not part of the advice in
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#minimize-code-in-headersAs the last editor of this I reached out to Erik who is currently on sabbatical and suggested I contact this mailing list to continue the discussion as to whether the advice on the above page should be extended to assist in these matters in the future.
Thanks, Chris.