3 ms·
The tool for deal with this is https://include-what-you-use.org/ https://include-what-you-use.org/ The idea is that each file (source or header) should include
by account42 5y ago
The tool for deal with this is https://include-what-you-use.org/ https://include-what-you-use.org/
The idea is that each file (source or header) should include exactly those headers from which it uses things. In practice, it gets a bit more complicated has you don't want to include internal implementation headers and sometimes the same thing does not even have a canonical public header but IWUY does allow you to configure all that to your liking.
- marco_craveiro 5y agoGreat point. And this will soon be available directly from Clang tools such as clangd, which will make life much easier.