Say we have this header file:
#pragma once
#include
class MyClass
{
public:
MyClass(double);
/* ... */
private:
Yes, the using file should include
explicitly, as that is a dependency it needs.
However, I wouldn't fret. If someone refactors MyClass.hpp
to remove the
include, the compiler will point them at every single file that was lacking the explicit
include, relying on the implicit include. It is usually a no-brainer to fix this type of errors, and once the code compiles again, some of the missing explicit includes will have been fixed.
In the end, the compiler is much more efficient at spotting missing includes than any human being.