Subject: Re: [boost] [functional] How to avoid a dependency on functional?
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-09 17:35:51
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
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk