--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/b8d0c1b86776e54a32562f3f117ade5d571fe394.7b17bc48.135c.4d81.bccf.8cbb8795ea1b%40feishu.cn.
The IWYU algorithm in cpplint (which is run on some but not all Chromium code) allows relying on the include from foo.h. If we want to enforce that we should be including from foo.cc as well then we should consider reconfiguring cpplint.
Include What You UseIf a source or header file refers to a symbol defined elsewhere, the file should directly include a header file which properly intends to provide a declaration or definition of that symbol. It should not include header files for any other reason.Do not rely on transitive inclusions. This allows people to remove no-longer-needed #include statements from their headers without breaking clients. This also applies to related headers - foo.cc should include bar.h if it uses a symbol from it even if foo.h includes bar.h.
Do not rely on transitive inclusions. This allows people to remove no-longer-needed #include statements from their headers without breaking clients. This also applies to related headers - foo.cc should include bar.h if it uses a symbol from it even if foo.h includes bar.h.
Do not rely on transitive inclusions. This allows people to remove no-longer-needed #include statements from their headers without breaking clients. This also applies to related headers - foo.cc should include bar.h if it uses a symbol from it even if the .h included by foo.cc includes bar.h.Try not to include the same .h in foo.cc and foo.h unless it is really necessary.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/b8d0c1b86776e54a32562f3f117ade5d571fe394.061e9113.ae38.47db.9996.5d6b18fc193b%40feishu.cn.