You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to add Include What You Use (IWYU) pragmas to indicate whether certain header files should not be included by the user directly. This is most often the case for *_impl.hpp header files that provide implementations for template classes.
This is a problem because many IDEs will auto-include headers incorrectly without these pragmas (also, clangd and other tools will complain about violating include-what-you-use).
The two relevant ones are export and private:
foo.h:
// end of file
#include "foo_impl.h" // IWYU pragma: export
foo_impl.h:
// beginning of file
// IWYU pragma: private; include "foo.h"
Summary
It would be helpful to add Include What You Use (IWYU) pragmas to indicate whether certain header files should not be included by the user directly. This is most often the case for
*_impl.hpp
header files that provide implementations for template classes.This is a problem because many IDEs will auto-include headers incorrectly without these pragmas (also, clangd and other tools will complain about violating include-what-you-use).
The two relevant ones are
export
andprivate
:foo.h:
foo_impl.h:
Docs: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md
Headers affected
These are the headers that could have such pragmas included:
The text was updated successfully, but these errors were encountered: