3 ms·
If the issue is with including transitive dependencies that are in your own codebase, then you should annotate the public interface header to the implementation
by anand-bala 5y ago
If the issue is with including transitive dependencies that are in your own codebase, then you should annotate the public interface header to the implementation details with IWYU Pragmas [1] that export the implementation (for example [2]).
If this is in third-party libraries, you can use IWYU Mappings [3] to map the "private" headers (usually the transitive include) to the public interface. An example that I use for the PEGTL library [4].
[1]: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md https://github.com/include-what-you-use/include-what-you-use...
[2]: https://github.com/anand-bala/signal-temporal-logic/blob/8006f81c5505118cb368189e351c7e56c26f1445/include/argus/core.hpp https://github.com/anand-bala/signal-temporal-logic/blob/800...
[3]: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md https://github.com/include-what-you-use/include-what-you-use...
[4]: https://github.com/anand-bala/signal-temporal-logic/blob/8006f81c5505118cb368189e351c7e56c26f1445/tools/pegtl.imp https://github.com/anand-bala/signal-temporal-logic/blob/800...