Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2023-03-13 21:57:53


On 14/03/2023 01:54, Boris Kolpackov wrote:
> This implicit "if you don't include the header then you don't need to
> link the dependency" approach doesn't scale well to cases where Boost is
> split into individual packages which are managed by a package manager.
> When the package manager undertakes to provide a Boost library, it
> should come with all the dependencies that could be needed for any
> usage scenario, unless certain features are explicitly not enabled
> (which is essentially what we have done -- not enabled regex by
> default in a bunch of libraries; I suppose we could have instead not
> enabled ICU in regex by default).

There does need to be a way to recognise optional or soft dependencies
though -- a library might include a compatibility header that can
optionally be included if you are also using another library, but this
should not require the other library as a hard dependency.

If you in turn write a library or app that does use both, then you
depend on both, but they don't depend on each other.

I think it's ok to put this on the downstream author -- they will try to
build, get a compile error, then add the missing dependency themselves.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk