Source files
SF.11
Header files should be self-contained
Reason
Usability, headers should be simple to use and work when included on their own. Headers should encapsulate the functionality they provide. Avoid clients of a header having to manage that header's dependencies.
Example
#include "helpers.h"
// helpers.h depends on std::string and includes <string>
Note
Failing to follow this results in difficult to diagnose errors for clients of a header.
Note
A header should include all its dependencies. Be careful about using relative paths because C++ implementations diverge on their meaning.
Enforcement
A test should verify that the header file itself compiles or that a cpp file which only includes the header file compiles.