Here's a scenario:
suppose you have #include <unordered_map>
in the header
and you don't declare it anywhere in the implementation file
but you use it, maybe
mp[whatever] = some;
should you re-include the <unordered_map>
header? what is best practice?
in general, what's the best practice w.r.t relying on transitive includes like this, assuming that those things you are relying on are perhaps part of the method type signatures or member variables?
to be more explicit:
std::unordered_map<>
might occur in the header
but no way does the type appear in the implementation. An object of that type is only used.