Keep headers “composition-safe” and minimal. Apply these rules:

Example (bad → good):

// bad: in header
// foo.h
int gettimeofday_impl(); // ...
int gettimeofday_impl() { return 0; } // implementation in header

// good: in header
// foo.h
int gettimeofday_impl();

// foo.cpp
int gettimeofday_impl() { return 0; }

Checklist for changes to .h files: