Ion GaztaƱaga wrote:
Had 'hash' been in its own module, I would consider simply including hash.hpp, rather than relying on forward declarations, as 'hash' should be a very lightweight module.
Not if it includes implementation for several types, and does now for standard types. including hash.hpp might import a non-negligible amount of headers.
This is solvable by splitting hash.hpp into hash/core.hpp, hash/map.hpp, hash/vector.hpp, and so on. Ordinary users include hash.hpp, People Who Care only include what's needed. I, personally, don't care that much about the standard headers, because in my experience, translation units often end up including most of the standard library anyway; but I do acknowledge that not everyone feels the same way.